Curl/Example 2

From Wikibooks, open books for an open world
< Curl
Jump to: navigation, search
{curl 5.0, 6.0 applet}

|| an example in the declarative style

{Table 
   {row-prototype "Name", "Description", "Cost"},
   {row-prototype "Apple", "A red fruit", "25"},
   {row-prototype "Banana", "A yellow fruit", "25"},
   {row-prototype "Orange", "A reddish-yellow fruit", "50"}
}

|*  Another way to comment 

This is HTML to do the same thing 


 <HTML>
 <BODY>
 <TABLE> 
 <tr><td>Name</td><td>Description</td><td>Cost</td></tr>
 <tr><td>Apple</td><td>A red Fruit</td><td>25</td></tr>
 <tr><td>Banana</td><td>A yellow fruit</td><td>25</td></tr>
 <tr><td>Orange</td><td>A reddish-yellow fruit</td><td>50</td>< /tr>  
 </TABLE>
 </BODY>
 </HTML>
 *|
 

This displays a table just like the declarative HTML inside the Comment.

Lines 1 - 4 are standard.

Line 5 declares a new table.

Lines 6 - 9 put the values into four rows

Line 10 ends the table.