CSS Single Element Shapes Square


Example

To create a square, define an element with both a width and height. In the example below, we have an element with a width and height of 100 pixels each.

a square

<div class="square"></div>
.square {
    width: 100px;
    height: 100px;
    background: rgb(246, 156, 85);
}