I have seen it a lot in css talk. What does semantically correct mean?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Labeling correctly
It means that you’re calling something what it actually is. The classic example is that if something is a
table, it should contain rows and columns of data. To use that for layout is semantically incorrect – you’re saying "this is a table" when it’s not.Another example: a list (
<ul>or<ol>) should generally be used to group similar items (<li>). You could use adivfor the group and a<span>for each item, and style eachspanto be on a separate line with a bullet point, and it might look the way you want. But "this is a list" conveys more information.Fits the ideal behind HTML
HTML stands for "HyperText Markup Language"; its purpose is to mark up, or label, your content. The more accurately you mark it up, the better. New elements are being introduced in HTML5 to more accurately label common web page parts, such as headers and footers.
Makes it more useful
All of this semantic labeling helps machines parse your content, which helps users. For instance:
fieldsetswith onelegendfor each one. A blind user can hear thelegendtext and decide, "oh, I can skip this section," just as a sighted user might do by reading it.type="tel"(for telephone numbers).