HTML (Hypertext Markup Language) is the standard language used to create web pages. HTML5 is the latest version of HTML and includes new features such as video and audio support, local storage, and new semantic elements.
Here are some basic elements of HTML5 that you should know:
- The
<!DOCTYPE>
declaration: This tells the browser which version of HTML you’re using. In HTML5, the declaration is simply<!DOCTYPE html>
. - The
<html>
element: This is the root element of an HTML document and contains all other elements. - The
<head>
element: This element contains meta information about the document, such as the title and link to CSS stylesheets. - The
<body>
element: This element contains the visible content of the web page. - The
<header>
element: This element represents a container for introductory content or a set of navigational links. - The
<nav>
element: This element represents a section of a page that contains navigation links. - The
<main>
element: This element represents the main content of a document. - The
<article>
element: This element represents a self-contained composition in a document, such as a forum post or a blog entry. - The
<section>
element: This element represents a thematic grouping of content, such as chapters or sections. - The
<aside>
element: This element represents a section of a page that contains content that is related to the main content, such as sidebar information or pull quotes. - The
<footer>
element: This element represents a container for the footer of a document or section.
Here are some example of HTML5 document:
<html>
<head>
<title>My Website</title>
</head>
<body>
<header>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<article>
<h1>Welcome to My Website</h1>
<p>This is the home page of my website.</p>
</article>
</section>
</main>
<aside>
<h2>Related Links</h2>
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul>
</aside>
<footer>
<p>Copyright © 2021 My Website</p>
</footer>
</body>
</html>
I recommend starting with some online tutorials or taking an online course to learn more about HTML