Home >Web Front-end >Front-end Q&A >How to add borders to html
htmlHow to add a border: First create a new HTML document and write the basic frame; then create a new div tag; finally add a border through the "border:1px solid red;" style.
The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.
Open the editor, create a new HTML document, and write the basic framework.
Create a new CSS document and associate it with the HTML document you just created.
Create a new div tag. You can see that this div has no border by default.
border: 1px solid red;
This is our common format for setting borders.
We can change the border to dotted style.
can also be modified to a dotted shape.
Recommended study: "html video tutorial"
The above is the detailed content of How to add borders to html. For more information, please follow other related articles on the PHP Chinese website!