Thursday, 9 June 2016

Non-Semantic Elements and Semantic Elements in HTML5


images (1).jpg
Non Semantic Elements:- Traditionally, developers have implemented non-semantic elements with a class attribute to define the structure and express the meaning of content. It tells nothing about its content. The element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements.
  1. <div>
  2. <span>
Example:
  1. <div class="article">
  2. <div class="header"
  3.       <h1>My blog post</h1>
Semantic Elements:- It introduces meaning to the web page rather than just presentation.
  1. <article>         It defines an article in the document
  2. <aside>          It defines content aside from the page content

Read the full Article about Non-Semantic Elements and Semantic Elements in HTML5 at Findnerd.

You can also post your Tech programming forums over Findnerd.