| 9:18 am on Apr 24, 2009 (gmt 0)|
Using a list for menu links is semantically correct - it's really the "proper" way to mark-up a menu, since it is a list of similar items. But using that choice, or using divs or even table cells should have no effect on your ranking.
| 10:12 am on Apr 24, 2009 (gmt 0)|
Yes, I agree with tedster that is the correct way to mark up a menu.
Personally, I'd get rid of the div because it's not needed, try this instead...
<li><a href="/green.html">Green Widgets</a></li>
| 10:20 am on Apr 24, 2009 (gmt 0)|
Thanks very much for this, where the <ul> opens the 'list' does where should the closing </ul> be? Is it necessary to open and close for each item on the list or can it be opened at the start and closed at the end?
I notice in the example from mrMister that there is only 1 open <ul> but 2 closing </ul> is that correct?
[edited by: Gemini23 at 10:43 am (utc) on April 24, 2009]
| 10:38 am on Apr 24, 2009 (gmt 0)|
I think that is a typo from copying and pasting. <u> means underline and is not generally used any more.
<ul> means a list and there should be an opening <ul> before all of your <li>List Item</li> items, and only one closing </ul> which should go after the end of all the list items.
| 1:35 pm on Apr 24, 2009 (gmt 0)|
About closing items: it depends on what flavour of HTML you use.
Per example, in HTML 4.01 Transitional you do not need to close the <li> (some others elements are also allowed to not be closed).
I'm a fan of validating the HTML, but I still use this option on some sites (remove the </li>, per example) to make the page weight less (I'm a fan of speed and yes, I also remove extra carriage returns, extra black spaces...)
| 1:38 pm on Apr 24, 2009 (gmt 0)|
|in HTML 4.01 Transitional you do not need to close the <li> |
You may be right but it would make me feel ill ;)
| 6:11 pm on Apr 24, 2009 (gmt 0)|
mrMister, can I ask - you say 'get rid' of the Div Id's and replace them with 'ul? simply rename them in the DWT that I use?