HTML Body Tag Elements
HTML Body Tag Elements
<h3>Shopping List</h3>
<ul>
<li>Milk</li>
<li>Bread</li>
<li>Eggs</li>
<li>Coffee Beans</li>
</ul>
<table>
<caption>Product Pricing for Q4 2023</caption>
<thead>
<tr>
<th>Product Name</th>
<th>Unit Price</th>
<th>Availability</th>
</tr>
</thead>
<tbody>
<tr>
<td>Laptop Pro X</td>
<td>$1299.99</td>
<td>In Stock</td>
</tr>
<tr>
<td>Monitor UltraView</td>
<td>$349.50</td>
<td>Low Stock</td>
</tr>
<tr>
<td>Ergonomic Keyboard</td>
<td>$89.00</td>
<td>Out of Stock</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">Total Products Listed:</td>
<td>3</td>
</tr>
</tfoot>
</table>
● Bundling HTML Blocks for Positioning: The div tag assists in organizing different
HTML blocks and positioning them clearly on the page, especially when employing
modern CSS layout models such as Flexbox or Grid.
● Animating Content: div elements can serve as effective targets for dynamic animations
involving HTML, CSS, and JavaScript, allowing developers to create interactive and
engaging user experiences.
● Example (Basic Container for a list):
<div>
<h2>My Favorite Books</h2>
<ul>
<li>"The Hitchhiker's Guide to the Galaxy"</li>
<li>"Dune"</li>
<li>"1984"</li>
</ul>
</div>