The .w3-container
class is a predefined class in W3.CSS that adds padding and margin to elements. It is commonly used to wrap content for better readability.
<div class="w3-container w3-blue">
<h1>Welcome to W3.CSS</h1>
<p>This is a container.</p>
</div>
You can combine .w3-container
with other classes to add more styles, such as colors or borders.
<div class="w3-container w3-red w3-border">
<p>This container has a red background and a border.</p>
</div>