Horje

Full Example of The <div> Element in HTML

index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<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>
  <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
</div> 

</body>
</html>

Output should be:

Full Example  of The <div> Element in HTML



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

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