Answers for "draw square css html"

CSS
1

how to make a square div in css

.square {
    background-color: #000;
    width: 50vw;
    height: 50vw;
}
.square h1 {
    color: #fff;
}
/* It works */
Posted by: Guest on May-26-2021
2

how to make square in html

index.html:
....
<div class="square_div">
</div>
....
style.css:
.square_div{
  width: <input_width_here>;
  height: <input_height_here>;
  background-color: <input_color_here>;
}
Posted by: Guest on February-15-2022

Browse Popular Code Answers by Language