HTML elements are the fundamental components of web pages. They consist of a start tag, content, and an optional end tag. Elements define the structure and provide functionality, such as headings, paragraphs, links, images, forms, tables, and more.
HTML elements consist of a start tag, content, and an optional end tag.
Example
<p>This is a paragraph.</p>
HTML common elements: headings, paragraphs, links, images, lists. They structure and display content on web pages.
Examples
<h1>Heading 1</h1>
<p>This is a paragraph.</p>
<a href="https://www.lets-coding.com">Click here</a>
<img src="/images/common/cutecat.png" alt="description of the image">
Unordered: <ul><li>Item 1</li></ul>
Ordered: <ol><li>Item 1</li></ol>
Attributes provide additional information to elements.
Examples
<img src="/images/common/cutecat.png" alt="description of the image">
<a href="https://www.lets-coding.com">Click here</a>
<input type="text" name="username">
Structural elements help organize and semantically structure web page content.
Examples
<header>
<h1>Website Header</h1>
</header>
<nav>
<a href="#home">Home</a>
<a href="#about">About</a>
<a href="#contact">Contact</a>
</nav>
<main>
<p>This is the main content of the page.</p>
</main>
<section>
<h2>About Us</h2>
<p>Welcome to our website!</p>
</section>
<footer>
<p>© 2023 Lets coding. All rights reserved.</p>
</footer>
HTML offers a wide range of elements for various purposes
<table><tr><td>Table cell</td></tr></table>
<audio src="/media/audio/sample.mp3" controls></audio>
<video src="/media/video/sample_video_720x480_2mb.mp4" controls></video>
Semantic elements are HTML tags that provide meaning and structure to content. They are important for accessibility and SEO purposes.
<article>
<h2>Article Title</h2>
<p>Article content goes here.</p>
</article>
<aside>Additional information goes here.</aside>
<mark>Highlighted text</mark>
<abbr title="World Wide Web">WWW</abbr>
<br>
<hr>