DIV (<div>) Tag

by Jai 28-Jun-19

0 631

In HTML, <div> tag permits users to specify a structural section or division in HTML document. You can easily bind together the sections of HTML elements and format them though CSS. You can make use of different attributes such as id, class, style and many more. Div tag has both opening (<) as well as closing (>) tag and it is mandatory to close the div tag.

Through <div>, one can easily use a particular section for a particular data or function due to this feature. It is widely used tag in web development.


<!DOCTYPE html>
<html lang="en">
<title>Example of HTML div tag</title>
<style type="text/css">
border:1px solid #333333;
.welcome-you-box h1, .welcome-you-box p
padding: 10px 30px;
<div class="welcome-you-box">
<p>Hi, welcome to our website codingtag.com</p>


DIV (<div>) Tag


Leave a Reply

    Waiting for your comments