Mobiprep has created last-minute notes for all topics of HTML to help you with the revision of concepts for your university examinations. So let’s get started with the lecture notes on HTML.
Our team has curated a list of the most important questions asked in universities such as DU, DTU, VIT, SRM, IP, Pune University, Manipal University, and many more. The questions are created from the previous year's question papers of colleges and universities.
Semantic Elements
Question- 1) What are Semantic Elements in HTML?
Answer: A semantic element clearly describes its meaning to both the browser and the developer.
Examples of non-semantic elements: <div>and <span> - Tells nothing about its content.
Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its content.
Because semantic HTML uses elements for their given purpose, it's easier for both people and machines to read and understand it.
Question- 2) Differentiate between semantic and non-semantic elements in HTML.
Answer: Semantics-Elements has meaning.Describes its meaning to browser and developer.
Example-
<article>
<section>
<header>
<footer>
<nav>
<aside>
<time>
Elements has no meaning called non-semantic elements.
Example-
<div>
<span>
Comments