![]() |
The The When used together with CSS, the |
<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>
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>
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 |
Basic Example of The <div> Element in HTML | HTML Block and Inline Elements |
Full Example of The <div> Element in HTML | HTML Block and Inline Elements |
Read Full: | HTML Block and Inline Elements |
Category: | Web Tutorial |
Sub Category: | HTML Block and Inline Elements |
Uploaded by: | Admin |
Views: | 126 |
Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_div