CSS — Width and Height
The width and height properties are used to set how big an element should appear on a webpage. You can define these sizes using units like px (pixels), % (percentage), or em. Pixels give fixed dimensions, while percentages make the size flexible based on the screen size. For example, setting a div to width: 50% makes it take half the width of its container. Using proper widths and heights helps in creating responsive layouts that look good on all devices. You can also set a max-width or max-height to prevent an element from becoming too large on bigger screens.
img { width: 120px; height: 80px; }
.container { width: 80%; max-width: 1200px; }