HTML5 how does the Border property be set? Introduction to the Border property in HTML5 table

Source: Internet
Author: User
Tags border color dashed line
HTML5 how does the Border property be set? HTML5 table Border properties are described here, this article mainly explains the HTML5 border properties in the CSS style of the definition and use of the method, as well as HTML5 in the table of the border properties of the introduction

HTML5 the definition and usage of the border property in CSS styles in a CSS style:

The border shorthand property sets all border properties in a declaration.

The following properties can be set sequentially:

Border-width

Border-style

Border-color

If you do not set one of these values, there will be no problems, such as Border:solid #ff0000; is also allowed.

HTML5 property values for the Border property:

CSS border is used to set the border of an HTML element, such as a div, including the width, color, and style of the border. This article to the code farm introduction CSS Border border property details, interested in the code farmers can refer to.

CSS border is CSS border-border border style color, border style, border width syntax structure and application case tutorial

First, CSS Border basic knowledge

CSS borders, CSS border, are CSS properties that control the border edge width, color, dashed line, and solid lines of an object. At the same time you can enter the code Nong Tutorial provide CSS manual view border.

Second, HTML original border and CSS border control

HTML Table control border:

Border= "1" bordercolor= "#000000"

Note: The control table border width is 1px,css color black, the default is a solid line style border.

Third, border border syntax

1. Four borders

Border-left set the left border, generally set the left box style to use separately

Border-right set the right border, generally set the right frame style to use separately

Border-top set the top border, generally set the top border style separately using

Border-bottom sets the bottom border, which is usually set by a separate border style, and sometimes the bottom border style can be applied as a CSS underline effect.

2. Four-sided same border border shorthand

#manong {border:1px Solid #00F}

3. Three styles of border

Usually we can set the width (thickness), border style, border color of the border three properties and parameters.

1) Border color: border-color: #000

2) Border thickness (width): border-width:1px

Use the number + units to set the border thickness width, such as 1px (the border thickness width is 1 pixels), the border must be a positive number, greater than 0 value. Otherwise, setting the border border style is not valid.

3) Border border style: Border-style:solid

The border style values are as follows:

    • None: No border. Regardless of any specified border-width value

    • Hidden: Hides the border. IE does not support

    • Dotted: ie4+ on Mac platforms with ie5.5+ on Windows and UNIX platforms. Otherwise the solid line (common)

    • Dashed: ie4+ on Mac platforms with ie5.5+ on Windows and UNIX platforms as dashed lines. Otherwise the solid line (common)

    • Solid: Solid line border (common)

    • Double: two-line border. Two single line with its interval and equal to the specified Border-width value

    • Groove: Draw a 3D groove based on the value of Border-color

    • Ridge: Draw a diamond border based on the value of Border-color

    • Inset: Draw 3D concave edge according to the value of Border-color

    • Outset: Draw 3D convex edge according to the value of Border-color

CSS Border Border Summary:

We use CSS to set the border border style, generally we use shorthand expressions to set the object border border style, so save code to simplify the role of code. Whether you set an edge border or a four-sided border, we all try to abbreviate the way the CSS border code, CSS border optimization shorthand, common object set CSS style using the Property code: border:1px solid #000;.

HTML <table> Tag Border property definition and usage:

The Border property specifies the width of the border around the table.

The Border property applies a border to each cell and surrounds the table with a border. If the value of the border property changes, only the size of the border around the table will change. The inner border of the table is 1 pixels wide.

Tip: Set border= "0" to display a table without Borders.

From a practical point of view, it is best not to specify borders, but instead use CSS to add border styles and colors.

HTML5 the syntax of the border property:

<body border= "Value" >

HTML5 property values for the Border property:

Pixels: Specifies the width of the table border.

HTML 5 <table> Border Property instances:

The following HTML table will display the border around the table cell:

<table border= "1" >  <tr>    <th> month </th>    <th> deposit </th>  </tr>  <tr>    <td> January </td>    <td>1000 $ </td>  </tr>  <tr>    <td> February </td>    <td>1500 </td>  </tr></table>

"Recommended"

What does the HTML area tag mean? An explanation of the use of HTML area tags

How does the

HTML5 source tag work? HTML5 Source Tag Property describes the

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.