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.
- <div>
- <span>
Example:
- <div class="article">
- <div class="header"
- <h1>My blog post</h1>
Semantic Elements:- It introduces meaning to the web page rather than just presentation.
- <article> It defines an article in the document
- <aside> It defines content aside from the page content
No comments:
Post a Comment