Home  >  Article  >  Web Front-end  >  How to add borders to html

How to add borders to html

藏色散人
藏色散人Original
2021-05-11 15:13:2124606browse

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.

How to add borders to html

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.

How to add borders to html

Create a new CSS document and associate it with the HTML document you just created.

How to add borders to html

Create a new div tag. You can see that this div has no border by default.

How to add borders to html

border: 1px solid red;

This is our common format for setting borders.

How to add borders to html

We can change the border to dotted style.

How to add borders to html

can also be modified to a dotted shape.

How to add borders to html

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Why is css compressed?Next article:Why is css compressed?