Forum Moderators: not2easy
Are there any CSS best practices that will help our SEO and maximize natural search positions for our important keywords?
Any advice would be greatly appreciated.
Thank you!
I would personally never use a JS menu for various reasons but mainly because I start limiting the amount of people who can access my sites.
Probably the easiest way of making a menu is to use an list-item. I say this becuase if you search for CSS menu templates most are created this way. I always use a list-item method because I find it easy to style and simple to configure.
There are no bad practices that I can think of. As long as the code is this kind of simple you'll have no problems:
<ul>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
<li><a href="link.html">Link</a></li>
</ul>
For navigational elements or nested elements, like unordered lists, it is common to style the tag and not use a custom selector.
.mainPage .mainNavigation ul{width:300px;}
.mainPage .mainNavigation li{float:left;display:inline;list-style:none;}
instead of
.widgetNavList{width:300px;}
.widgetNavListItem{float:left;display:inline;list-style:none;}
Have people found that using named classes or ids help with rankings or help with disability programs like Jaws? What do people think about always using classes and ids and not using tag selectors?
How you code it depends on personal preference really. I tend to flip between:
<ul class="blah">
<li></li>
</ul>
and
<div class="blah">
<ul>
<li></li>
</ul>
I try to keep the LI's clear of ID's or classes because I sometimes need to style the first/last LI differently from the others. I might also need an active class for the active page. In all these cases keeping the LI's clear make it easier for me to see clearly what's going on.
As I say though, it really is personal taste.