Search code examples
htmlsemantic-markup

What is the benefit of semantic tags?


I'm following a tutorial series on web development. While I already have a basic understanding of HTML and how to use it to structure a page, I'm indulging myself and watching the very beginner tutorials. The funny thing is, in these tutorials the author is using tags like address and cite. When he describes why one should use these tags, he explains it only as "semtantics."

While I feel like these tags may have been more prevalent ten years ago, I never run across anyone using them besides this guy. Given he is professional, I'm now conflicted on whether or not its really necessary to use them. What is the benefit?


Solution

  • According to the current HTML5.1 specification nightly (as modern as it gets):

    The address element is valid perfectly fine to use and so is the cite element. While a lot of sites tend to mostly use tags like div and span you can feel safe to use both address and cite .

    I think it's good practice that will help you later when you have to read your HTML again to insert changes. It improves accessibility of your document as well as lets parsers other than browsers understand it better.

    (Note, address and cite are legal in the old HTML specification too)