Reputation: 4095
I am making jquery carousel for my website.
in 99% of the tutorials, people make it using <ul>
and <li>
.
for SEO I prefer to use <div>
s, <ul>
and <li>
used for menus...
Is there any other reason why people use <ul>
and <li>
over <div>
s for jquery Carousel, except for the simplicity?
Thank you very much.
Upvotes: 1
Views: 760
Reputation: 5829
Yup, semantics.
Before html5 came along the semantic web was a hotch potch of mixed matched ways of having a websites underlying code make sense.
As humans, we can look at a typical layout, and understand it's intention if we see a
<div id="menu" />
we can easily deduce that it's a menu.
however as far as a computer, or a screen reader for the visually impaired is concerned, they have no grasp on this concept. Mix this with the fact that not everyone uses "menu" as the id, then there is no way that a screen reader could interpret your div as anything other than a div.
As a result, many web developers made a noise about standards and tried to encourage majority of people to follow them, things like ul & li for single column objects and standard names for div & span ID's and generally tried to promote best use of a bad situation.
All this however is set to change with html5
New tags for things like navigation, headers, footers, lists, sidebar objects etc are set to change the semantic web forever, no longer will screen reader software have to guess at the intention as long as people use the new tags correctly, screen scraping apps or social media tools will be able to co-operate better with sites simply because they can deduce intent purely from the layout of the code.
It's not all just bells & whistles with audio & video, html5 has a very serious side to it also, and that's the eradication of all these ugly hacks and attempts at self policed best practices, ultimately providing a better web for the future.
Upvotes: 1