html - What is the best practice for CSS-styled menu markup? -


So, I'm 'collecting' the CSS menu for a while (another word would be 'borrowed', however Secondly, to learn from them and to reuse some disturbances in their own projects, 'be stunningly unsteady'.

Being an old old HTML Purest, I think of style Love & lt; ul & g; s and

    s, and better menu and tab interface etc. Use method, for ease of access or meaning or for whatever reason I prefer the method mainly because it keeps my HTML source good and clean.

    Now, To fit the 'master' markup pattern, I've re-applied the collection of my CSS menu, which I have extrapolated most, is flexible examples, such as CSS Jane Garden. It looks like:

     < Code> 

    (Finally used to clear the 'clear' period to : both after this menu are required)

    However, I have seen variations on this markup on many sites, some have an extra attachment , using a different word than existing , some current & lt; Li & gt; instead of and class tag and some inner . Everyone seems to have their own way of marking menus, which is just a little different.

    However, after tampering with the lot of the menu, with the above I came, but I am trying to figure out whether to There is a real established best practice, I want to set up a simple CSS menu foundry at some point, and it would be nice to get some input on the markup before proceeding.

    Edit: The question is about not the Javascript menu address there are excellent script menus, and they Submenu allow more advanced animation and hover time, shortcut key, drop shadow, and everything else. But 90% of the menus those features are not required , and it is better to use CSS for styling and hovering effects.

In addition to excluding the Span Tag, I think it's OK.

Because of your setup, they do not have any reason because you want the text to be in style

  li one {/ * styles} >  

You can

  & lt; Duration class = "clear" /> gt; & Lt; Br / & gt;  

Also, if you are trying to float just UL inside the div, then you can probably div scope. If you need to be clear for any other reason, you can

  & lt; Br = clear = "all" /> gt;  

Comments