html tutorial - border Attribute in HTML - html5 - html code - html form




Border attribute in html

Learn html - html tutorial - Border attribute in html - html examples - html programs

  • The border attribute specifies the border of the table.
  • The border is an integer attribute defines in pixel to display the border around the table.

Syntax for border attribute in HTML:

<table border=”value”

Differences between HTML 4.01 and HTML5 for border attribute:

HTML 4.01

  • HTML4 support border attribute.

HTML 5

  • HTML5 does not support border attribute.

Applies To:

Elements Attribute
<table> border

Attribute Values:

Value Description
0 No borders around the table cells.
1 Add borders around the table cells.
number To specify the size of the frame surrounding the table.

Sample Coding for border Attribute in HTML:

Tryit<!DOCTYPE html>
<html>
<body>
        <table border="2">
        <tr>
        <th>Technology</th>
         <th>language</th>
        </tr>
        <tr>
        <th>HTML</th>
         <th>Markup lang</th>
        </tr>
        <tr>
        <th>JavaScript</th>
         <th>Scripting lang</th>
        </tr>
        </table>
</body>
</html>

Code Explanation for border Attribute in HTML:

 border Attribute Code Explanation

  1. The border attribute is declare the border with value 2 for the table.

Output for border Attribute in HTML:

 border  Attribute Tag Output

  1. The output displays the table with border in the HTML page.

Browser Support for border Attribute in HTML:

Yes Yes Yes Yes Yes

Related Searches to border Attribute in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×