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