HTML <div> tag

You are Here:

HTML <div> tag

The <div> tag defines a section of a HTML document.

Note: The div element is also called as a container. It has no effect on the content or layout until styled using CSS.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <div style="color:red;"> <span>Div tag</span> <span>is a block element</span> </div> <div style="color:green;"> <span>Div tag</span> <span>is a block element</span> </div> </body> </html>

Attributes

There is no special attributes for <div> tag. Only Global attributes.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author