![]() ![]() Semantic HTML enables effective Search Engine Optimization (SEO). For example, and article title enclosed in one of the headings (h1 and its hierarchy) would get higher importance and hence visibility than spans. Any software program that uses the globally known tags will not be able to understand our page.Ī working example of this is that search engines weigh keyword importance according to what they are. If we use globally known tags, others understand without any additional effort. The two points mentioned earlier are the basic benefits of using semantic code. Well structured HTML will have semantic meaning for a wide range of users and user agents (browsers without style sheets, text browsers, PDAs, search engines etc.) ![]() Semantic code uses html elements for their given purpose. Which is what the draft HTML5 specs would do. So it makes sense to create new elements, like and and. In the real world, people are constantly coding things like and. Why not just have an tag? It would make our lives easier." Web coders would complain, "hey, we do this all the time. I think it's natural for HTML to become more semantic over time.īack in Dumb HTML world, they'd probably end up with crazy markup, like, and. Making your site load quickly is a different question altogether.Īddendum - evolving towards semantic HTML ![]() Semantic HTML is what all HTML should be: useful, meaningful labels. The point is, HTML is markup, which is about labeling things usefully. For example, using instead of conveys "this text is important" and not necessarily "this text should be bold." Maybe your user wants important text to be highlighted orange. Some aspects of semantic HTML are a bit idealistic, but the principle is sound. The real world is somewhere between these two scenarios. "My user doesn't care about footnotes and wants to ignore them."."My user is blind, so I should announce that there are images, offer to read the associated captions, and not bother downloading the actual image data."."My site is about jewelry, so I want list bullets to appear as diamonds.".If you want to override the user agent's default treatment of an element, or if a user agent is set to do so, it's easier to target specific kinds of content. A screen reader might give more priority to reading the s than the s. For example, a browser will make s look clickable and will enable moving between them with the tab key, whereas if you use a, it won't know to do that. Now a user agent (a browser or screen reader) can make reasonable assumptions about how to style those, or make them interactive, or read them aloud. You've got and and and and and and, etc. Meanwhile, in Detailed HTML World, there are loads of names.How would you specify where styles should be applied? How would browsers know how to render the page? How would screen readers for the blind differentiate between headlines and text and footnotes and menu items? You'd have to add all kinds of awkward attributes. In Dumb HTML World, there is only one tag.Semantic markup isn't about performance, it's about meaning. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |