Home
HTML
HTML Div
Tryit: div as a container
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <style> div { background-color: #FFF4A3; } </style> <body> <h1>HTML DIV Example</h1> <div> <h2>London</h2> <p>London is the capital city of England.</p> <p>London has over 9 million inhabitants.</p> </div> <p>The yellow background is added to demonstrate the footprint of the DIV element.</p> </body> </html>