Home > Article > Web Front-end > How to set the html5 border attribute? Introduction to the border attribute in html5 table
html5 How to set the border attribute? The introduction to the border attribute in html5 table is here. This article mainly explains the definition and use of the html5 border attribute in css styles, as well as an introduction to the border attribute in html5 table
html5 The definition and usage of the border attribute in css style:
border shorthand attribute sets all border attributes in one statement.
You can set the following properties in order:
border-width
border-style
border-color
If you do not set any of them A certain value will not cause problems, such as border:solid #ff0000; is also allowed.
Attribute value of html5 border attribute:
CSS border is used to set HTML elements (such as div) border, including the width, color and style of the border. This article introduces the details of the CSS border property to programmers. Interested programmers can refer to it.
CSS border is CSS border-border border style color, border style, border width syntax structure and application case tutorial
1. CSS border basics Knowledge
CSS border is the CSS border that controls the width, color, dashed line, solid line and other style CSS properties of the object's border. At the same time, you can enter the CSS manual provided by the coder tutorial to view the border.
2. Comparison between Html original border and CSS border
Html table control border:
border="1" bordercolor="#000000"
Description: Control the table border width to 1px, css color is black, and the default is a solid-line style border.
3. Border border syntax
1. Four borders
border-left sets the left border. Generally, use ## to set the left border style separately.
#border-right sets the right border. Generally, to set the right border style separately, use border-top to set the top border. Generally, to set the top border style separately, use border-bottom to set the bottom border. , generally used to set the bottom border style separately, sometimes the bottom border style can be applied as a css underline effect. 2. The abbreviation of border with the same border on four sides#manong{border:1px solid #00F}3. Three styles of bordersUsually we can Set three properties and parameters for the border: width (thickness), border style, and border color. 1) Border color: border-color: #0002) Border thickness (width): border-width: 1px Use numerical units to set the border thickness width, For example, 1px (border thickness and width is 1 pixel), the border must be a positive number, a value greater than 0. Otherwise, setting the border style is invalid. 3) border border style: border-style:solidThe border style value is as follows:We use CSS to set the border style, generally we use abbreviations The expression sets the border style of the object, which saves code and simplifies the code function. Whether setting a single border or a four-sided border, we try to abbreviate the CSS border code, which is the abbreviation of CSS border optimization. Commonly used attribute codes for setting CSS styles on objects are: border:1px solid #000;.
HTMLThe above is the detailed content of How to set the html5 border attribute? Introduction to the border attribute in html5 table. For more information, please follow other related articles on the PHP Chinese website!