1. Semantic HTML Elements
Semantic elements clearly describe their purpose in both the code and the browser. These elements improve accessibility and SEO.
Examples:
<header> - Represents the header of a page or section.
<nav> - Represents navigation links.
<main> - Represents the main content of a page.
<article> - Represents a self-contained piece of content.
<section> - Groups related content.
<footer> - Represents the footer of a page or section.
2. Multimedia Elements
HTML supports multimedia elements for embedding audio, video, and images in your pages.
2.1 Adding Images:
<img src="image.jpg" alt="Description of image" width="300" height="200">
2.2 Embedding Videos:
<video width="400" controls>
<source src="example.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
2.3 Embedding Audio:
<audio controls>
<source src="example.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
3. Advanced Forms
Forms allow users to input and submit data. HTML5 introduces new input types and attributes.
Example Form:
<form action="/submit" method="POST">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="dob">Date of Birth:</label>
<input type="date" id="dob" name="dob">
<button type="submit">Submit</button>
</form>