How to use List in XHTML
The lists are almost always present with the new sites coded in XHTML strict. Indeed, they are often used to create menus. You do not perhaps aware, but the menu you see on the left of this site is a list, decorated with CSS. Do not be put off if you also talk about menus in this chapter, you will see that it is better to create menus with lists that using <br /> to skip lines. The lists can be better understood by those who use special browsers, and the record is identical to the graphical browsers. You have nothing to be afraid to use them. We will now see what are the three types of lists available:
The bulleted lists unordered: these lists are the smart base.
The bulleted lists ordered the chips have a number and are ordered.
The list of definitions: they do not have fleas, but will allow you to classify information more easily. We will see why a little lower.
The bulleted lists Unordered
The bulleted lists are not ordered primarily used in websites. Here is an example of a bulleted list (not formatting):
<Ul> <Li> Element 1 </ li> <Li> Element 2 </ li> <Li> Element 3 </ li> </ Ul>
As you can see, we start the list by tag <ul> each element is surrounded by tags <li>, and then closes the list with </ ul>. Note that you can not save as text or tags outside <li> tags. I do not want to see this:
<Ul> <Strong> <li> Element 1 </ li> </ strong> <Li> Element 2 </ li> <Li> Element 3 </ li> </ Ul>
<Ul> Title of my list <Li> Element 1 </ li> </ strong> <Li> Element 2 </ li> <Li> Element 3 </ li> </ Ul>
Re: How to use List in XHTML
It differs from the previous by the fact that adds numbers to the bullets. So there is a notion of order, not necessarily binding in the facts that you listed, but useful when you describe the steps. This list differs from the previous one only by the fact that this time you use the <ol> and no <ul> to begin the list. The elements will always be realized by tags <li>.
Here's an example:
<P> Remove the cap from the end of the USB Stick. </ p> <Ol> <Li> Pull out the SIM card holder from its slot and insert the SIM </ li> <Li> Re- insert the SIM card holder into the USB Stick. </ li> <Li> TPlug the USB Stick into your computer's USB port - make sure the USB Stick is fully inserted </ li> <Li> Now connect to laptop and access internet </ li> </ Ol>
You see, this is not complicated, at least not yet.
Re: How to use List in XHTML
As their name suggests, lists of definitions are mainly used to list words and their associated definitions. They may have other uses thanks to CSS, and it is possible to use in menus. There are some elements that change from the two other lists that we have just seen:
First, to start a list of definitions, we use the tag <dl>. Then, to say that we will define a word, use the tag <dt>. Finally making the definitions of the word, use the tag <dd>. Here is an example that will help you better understand:
<Dt> Body </ dt>
<Dd> Definition 1 </ dd>
<Dd> Definition 2 </ dd>
<Dt> computer information </ dt>
<Dd> computer Motherboard </ dd>
And here's what happens:
|Tags: list, xhtml|
|Thread Tools||Search this Thread|
|Similar Threads for: "How to use List in XHTML"|
|Thread||Thread Starter||Forum||Replies||Last Post|
|JKsf and xhtml||Sargam||Software Development||5||23-07-2010 06:09 AM|
|Don't know about the advantages of XHTML||Sarfaraj Khan||Software Development||5||30-01-2010 01:43 PM|
|How to Host an XHTML Website with a FTP?||hatred||Software Development||5||06-01-2010 07:49 PM|
|Is XML, DHTML, and XHTML are all the same thing?||Mentos||Software Development||3||12-09-2009 01:13 PM|
|Differences between XHTML and PHP||JTD||Software Development||1||22-11-2008 02:42 PM|