AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

HTML div class container

Is - container - for div class a special elemnt or special meaning?
Simple - You could call it main-box or big-frame how you like, but if you see the word container on your HTML code, you know it is to contain something, and give it a good position on the HTML code.

HTML div class container - how to create - example

You try to give elements a logic name, why? because if you look back on your HTML code later, you will know what it is this element, and you can edit it easy.
If you ask someone for help, the code is easy to read, so they can understand it quickly.

Example 1:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple CSS layout - how to use div container into your page using Dreamweaver with responsive image</title>
<meta name="description" content="Simple CSS layout - learn how to use div container into your page using Dreamweaver with responsive image This is a free course to learn HTML, CSS, PHP, SQL online." />

<style type="text/css">
body {
padding: 12px;
font-family: Verdana, Geneva, sans-serif;
font-size: 14px;
line-height: 20px;
}
.container {
width: 99%;
border: 2px solid #B4B4B4;
border-radius: 5px;
height: auto;
padding: 6px;
}

.header {
width: 100%;
height: 80px;
background-color: #E1E1E1;
padding: 20px;
box-sizing:border-box
}
.footer {
width: 100%;
height: 80px;
background-color: #666666;
padding: 20px;
box-sizing: border-box;
color: #FFF;
}

p {
margin: 10px;
}
.responsive-image {
width: 80%;
height: auto;
background-color: #EFEFEF;
padding: 20px;
box-sizing: border-box;
color: #FFF;
box-sizing: border-box;
}
-->
</style>
</head>

<body>

<div class="container">
<div class="header"><strong>Your head title</strong></div>
<p><strong>Simple CSS layout - learn how to use div container into your page using Dreamweaver with responsive image</strong>. This is a free course to learn HTML, CSS, PHP, SQL online</p>

<img src="https://www.agernic.com/layout/www.agernic.com-html-tutorial.jpg" alt="Nature" class="responsive-image" width="600" height="400">
<br />
<p><strong>Your text here</strong></p>
<p>- 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>

</p>
<div class="footer"><b>Your footer text</b></div>
</div>


</body>
</html>

CSS cod above will display this CSS result -

my image align center

Note: Does div class="container" have any special function? No, you can give it any name.


container class, html div class container
HTML div class container - html tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


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


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


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


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.