HTML container
HTML Tutorial » HTML container
A container is a <div> tag with a class=“container”. The container will affect all elements between " <div> </div>" tags with class=“container”.Syntax:
div is a tag.
class is an attribute of div tag
container is a class name.
Also, we have container tags what it is:
- article
- section
- div
What is a "container" in HTML?
"container" is a class name in this HTML code: <div class="container"> your_text </div>
div is a tag.
class is an attribute of div tag
container is a class name.
<!DOCTYPE html>
<html>
<head>
<title>How do I make a container box in HTML? - example</title>
<style>
.container {
width: 90%;
height: auto;
background-color: #FF9;
margin-right: auto;
margin-left: auto;
color: #066;
} </style>
</head>
<body>
<div class="container">
<h2>your container title here</h2>
<p><strong>Your text here</strong></p>
<p> Another text : - Grape silver beet collard
greens avocado quandong fennel gumbo black-eyed
pea watercress potato tigernut corn groundnut.
Chickweed okra pea winter purslane
coriander yarrow sweet pepper radish garlic
brussels sprout groundnut summer purslane
earthnut pea tomato spring onion azuki bean gourd.
Gumbo kakadu plum komatsuna
black-eyed pea green bean zucchini gourd
winter purslane silver beet rock melon
radish asparagus spinach. - </p>
<!-- end container div class --> </div>
</body>
</html>
Related subjects:
div class container
Create html link without underline
Open link in new tab - Create link
How do I make a "container" box in HTML?
How do I make a "container" box in HTML?
To make a "container" HTML element you mast declare as a class name like: <div class="container"> your_text</div>
<!DOCTYPE html>
<html>
<head>
<title>How do I make a container box in HTML? - example</title>
<style>
.container {
width: 90%;
height: auto;
background-color: #FF9;
margin-right: auto;
margin-left: auto;
color: #066;
} </style>
</head>
<body>
<div class="container">
<h2>your container title here</h2>
<p>This is a paragraph </p>
<p>under the containe box </p>
<p><strong>Your text here</strong></p>
<p> Another text : - Grape silver beet
collard greens avocado quandong fennel gumbo black-eyed
pea watercress potato tigernut corn groundnut.
Chickweed okra pea winter purslane
coriander yarrow sweet pepper radish garlic
brussels sprout groundnut summer purslane
earthnut pea tomato spring onion azuki bean gourd.
Gumbo kakadu plum komatsuna
black-eyed pea green bean zucchini gourd
winter purslane silver beet rock melon
radish asparagus spinach. - </p>
<!-- end container div class --> </div>
</body>
</html>
Tags: container class, fluid, tags, elements, box, border, template, row padding, responsive, size, width, center, table, background color
How do "containers" work in HTML?
As shown in the paragraphs above. A container is a <div> with a class=“container”. The container will affect all your_text under <div> class="container"> your_text</div>.
Also, we have container tags what it is:
- article
- section
- div
This is an editor and you can change parameters in the box below
<!DOCTYPE html>
<html>
<head>
<title>How do "containers" work in HTML? - example</title>
<style>
.container {
width: 90%;
height: auto;
background-color: #FF9;
margin-right: auto;
margin-left: auto;
color: #066;
} </style>
</head>
<body>
<div class="container">
<h2>your container title here</h2>
<p>This is a paragraph </p>
<p>under the containe box </p>
<p><strong>Your text here</strong></p>
<p> Another text : - Grape silver beet collard
greens avocado quandong fennel gumbo black-eyed
pea watercress potato tigernut corn groundnut.
Chickweed okra pea winter purslane
coriander yarrow sweet pepper radish garlic
brussels sprout groundnut summer purslane
earthnut pea tomato spring onion azuki bean gourd.
Gumbo kakadu plum komatsuna
black-eyed pea green bean zucchini gourd winter
purslane silver beet rock melon
radish asparagus spinach. - </p>
<!-- end container div class --> </div>
</body>
</html>
container class, fluid, tags, elements, box, border, template, row padding, responsive, size, width, center, table, background color
HTML container - html tutorial
This tool makes it easy to create, adjust, and experiment with custom colors for the web.

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.

Find here examples of creative and unique website layouts.

Find here examples of creative and unique website CSS HTML menu.