Non-Semantic Elements
Tags like div, and span fall under the Non-Semantic categories as their names don’t tell anything about what kind of content is present inside them.
div It is a block-level element or division of a section. It is used as a container.
<!DOCTYPE html>
<html>
<head>
<title>div Tag</title>
<style>
.GFG {
color:#006400;
}
</style>
</head>
<body>
<h1>div Tag</h1>
<div class="GFG">
<h1>w3wiki</h1>
<p>w3wiki is a Computer Science portal</p>
</div>
</body>
</html>
Output:
span: It is an inline element that doesn’t start on a new line and takes up only the necessary width. For more details use https://www.w3wiki.org/span-tag-html/.
HTML5 Semantics
HTML5 Semantics refers to the use of specific tags like <header>, <footer>, <nav>, <article>, <section>, etc., to provide clearer structure and meaning to web content. This improves accessibility, and SEO, and facilitates better understanding by both humans and machines.