Horje

Basic Example of The <div> Element in HTML

When used together with CSS, the <div> element can be used to style blocks of content:
 <div style="background-color:black;color:white;padding:20px;">
  <h2>London</h2>
  <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
</div> 



Single Articles
Basic Example of The <div> Element in HTMLHTML Block and Inline Elements
Full Example of The <div> Element in HTMLHTML Block and Inline Elements


Related Articles
What is HTML Block and Inline Elements HTML Block and Inline Elements
How to create HTML Block-level Elements HTML Block and Inline Elements
How to create HTML Inline Elements HTML Block and Inline Elements
How to crearte The <div> Element in HTML HTML Block and Inline Elements
How to create The <span> Element in HTML HTML Block and Inline Elements

Category:
Web Tutorial
Sub Category:
HTML Block and Inline Elements
Uploaded by:
Admin