Try the HTML5 Course for Free!

Add Table Borders Using HTML5

/ / HTML, Latest
HTML Terminology- Tutorial: A picture of the “Mastering HTML5 & CSS3 Made Easy v.1.0” training interface.

Add Table Borders Using HTML5: Overview

            This blog post shows how to add table borders using HTML5 code. By default, tables that you create do not have visible borders (a line around the table that visually defines the table). Borders can help to make your table stand out more and adds visual interest. To assign a border, insert the BORDER attribute into the <table> start tag and assign a thickness to the table border, measured in pixels. The thickness will only be applied to the table border and not the individual cells. If you wish to change the color, add the BORDERCOLOR attribute to the <table> start tag and assign the color you want as the value. The border color will be applied to the table border, as well as the individual cell borders.

            While you can style your table in your HTML coding, it’s a good idea to do most of your style selection in your cascading style sheet, which is cover in a different chapter within our complete tutorial, named “Mastering HTML5 & CSS3 Made Easy v.1.0.”

Add Table Borders Using HTML5: Code Syntax

Start Tag: <table>
End Tag: </table>
Associated Tags: <tr>…</tr>
Associated Tags: <td>…</td>
Attributes: border= Measured in pixels.
Attributes: bordercolor=
Example: <table border=“6px”
bordercolor=“#000000”>
<tr>
<td>Red</td>
<td>Black</td>
<td>Blue</td>
</tr>
<tr>
<td>Green</td>
<td>Gold</td>
<td>Silver</td>
</tr>
</table>
Result:
Red Black Blue
Green Gold Silver
Creates a table with a 6 pixel thick border.

Add Table Borders Using HTML5: Video Lesson

            The video shown below, titled “9.2- Table Borders,” shows how to add table borders using HTML5. This video is from our HTML5 and CSS3 tutorial, named “Mastering HTML5 & CSS3 Made Easy v.1.0.” You can see a picture of the training interface below the video lesson.

Add Table Borders Using HTML5: A picture of the “Mastering HTML5 & CSS3 Made Easy v.1.0” training interface.

Add Table Borders Using HTML5: A picture of the “Mastering HTML5 & CSS3 Made Easy v.1.0” training interface.
TOP
$199 $49 Entire Library! 0 Days 0 Hours 42 Minutes 19 Seconds      Get a better deal!
Ask For Coupon