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: 100px; width: 500px; background-color: powderblue; } </style> </head> <body> <h2>Set the height and width of an element</h2> <div>This div element has a height of 100px and a width of 500px.</div> </body> </html>