Home
CSS
CSS Height/Width
Tryit: Height and width properties
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> div { height: 50px; width: 100%; border: 1px solid #4CAF50; } </style> </head> <body> <h2>CSS height and width properties</h2> <div>This div element has a height of 50 pixels and a width of 100%.</div> </body> </html>