Learn HTML part 27

The <div> Element

The <div> Element is a block level element that is often use as a container for other HTML elements.
When use together with some CSS styling, the <div> Element can be used to style blocks or content.
For an example 
<html>
<body>
<h1> Headline </h1>
<div style=" background-color:yellow; color:blue; padding:20px;">

<p> This is the first paragraph </p>
<p> This is the second paragraph </p>
</div>
</body>
</html>

Result 


Post a Comment

0 Comments