Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

HTML: div tag

The HTML <div>…..</div> tag is used define a section of document. Using div tag, you can group large sections of HTML elements together and format them with CSS. The <div> element is very often used together with CSS, to layout a web page.

By default, browsers always place a line break before and after the <div> element. However, this can be changed with CSS.

Inside: Body tag

<html>
	<head> </head>
	<body>
		<p>paragraph outside div tag</p>

		<div style="color: red">
  		         <h3>heading tag is inside div tag</h3>
  		          <p>paragraph tag is inside div tag</p>
		</div>

	</body>
</html>

Outside: Body tag

<html>
	<head>
		<style>
			div {
    				color: red;
			       }
		</style>
	</head>
	<body>
		This is body. 
	<div> inside div tag which is calling form the out side of the body</div>
	</body>
</html>

vikashdev k
Latest posts by vikashdev k (see all)
Tagged : / / / / / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x