HTML Semantic


1. Semantic

Semantic components have meaningful names that indicate the nature of material. For example, headers, footers, tables, and so on. HTML5 contains several semantic components, which are listed below, that make code easier to create and comprehend for developers while also instructing browsers on how to treat them.


2. Non-Semantic

Tags like div and span belong under the Non-Semantic category since their titles don't indicate what sort of material is contained within them. div It is a block level element or section division. It functions as a container.

Example

Preview

FAQs

Semantic HTML improves accessibility by making it easier for screen readers and other assistive technologies to understand the content of a web page. By using semantic tags, developers can provide more meaningful information about the content on the page, which can help users with disabilities navigate the site more easily.

Semantic HTML is a way of writing HTML that focuses on the meaning of the content rather than its presentation. It uses HTML tags to convey the meaning of the content, making it easier for search engines and screen readers to understand the content and for developers to maintain and update the code.

Yes, there are some disadvantages to using non-semantic HTML tags. Unlike semantic elements, non-semantic elements do not convey any meaning or information about the content they contain. This can make it more difficult for search engines and assistive technologies, such as screen readers, to understand the content of the webpage, which can negatively impact its accessibility and SEO. While non-semantic elements like the div tag can be useful for formatting, it is generally recommended to use semantic HTML to improve the accessibility and maintainability of your webpage.