| Viewed 171 times

how to create a box in html


how to create a box in html

1 Answer
Mikdam Qandeel
Answered
4

Creating or Drawing a box in HTML doesn't need anything just you have to know the height and the width for the box.

for example, I want to create a box with 200px width and 100px height with black border So, it's a rectangle! Let's do it.

Example:

<div style="width:200px; height:100px; border:1px solid #000;">I am a rectangle!</div>

Output:

I am a rectangle!