Home
HTML
Block and inline
Tryit: HTML block elements
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <p style="border: 1px solid black">Hello World</p> <div style="border: 1px solid black">Hello World</div> <p>The P and the DIV elements are both block elements, and they will always start on a new line and take up the full width available (stretches out to the left and right as far as it can).</p> </body> </html>