6. Media Elements
HTML provides elements to embed audio, video, and other media files in your web pages:
1. Audio
Embed audio files using the <audio> element:
<audio controls>
<source src="audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
2. Video
Embed video files using the <video> element:
<video controls width="320" height="240">
<source src="video.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
7. Table Elements
Tables are used to display data in a structured format:
1. Basic Table
Create a basic table with rows and columns:
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
<tr>
<td>Jane</td>
<td>30</td>
</tr>
</table>
8. Form Elements
Forms allow users to input and submit data:
1. Input Fields
Use the <input> element to create text boxes:
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name">
</form>
2. Submit Button
Add a button to submit the form:
<form>
<button type="submit">Submit</button>
</form>
9. Semantic Elements
Semantic elements provide meaning to your HTML structure:
1. <header>, <main>, <footer>
Organize your webpage using semantic tags:
<header>
<h1>Welcome to My Website</h1>
</header>
<main>
<p>This is the main content area.</p>
</main>
<footer>
<p>Copyright 2025.</p>
</footer>