| HTML Reference Hub |
Semantic HTML |
HTML Semantic ElementsSemantic HTML elements clearly describe the meaning of the content they contain. They help browsers, developers, and search engines understand the structure of a webpage. Semantic elements make websites easier to read, maintain, and improve accessibility for users. Common Semantic ElementsHTML5 introduced several semantic elements that describe different parts of a webpage.
Syntax<header> Website Header </header> <nav> Navigation Menu </nav> <main> Main Content </main> <footer> Website Footer </footer> Example<!DOCTYPE html> <html> <head> <title>Semantic HTML</title> </head> <body> <header> Website Header </header> <nav> Home | About | Contact </nav> <main> <section> <h2>Welcome</h2> <p> This is the main content. </p> </section> </main> <footer> Copyright 2026 </footer> </body> </html> Benefits of Semantic HTML
Best Practices
|