Border Attribute Example – HTML Syntax – Border HTML Example
Border Attribute Example – HTML Syntax – Border HTML Example
Summary: – Illustrates the HTML syntax for the border attribute.
Prerequistes:
- Install Visual Web Developer 2008 – We are using Visual Web Developer for a development environment so that we can build a website of syntax examples. It also helps by providing intellisense and debugging assistance.
If you do not want to build a library of syntax examples, you can download an excellent free html editor at nvu
Restrictions: None
Notes:
- You can build your own library of syntax examples by using same web site over and over and just add new files to it.
Instructions:
- Use Visual Web Developer 2008
- Create new web site;
- Click File/New Web Site
- Select ASP.NET Website Template
- Select C-Sharp for Language
- name of Web Site could be HTML_Syntax.
- Add New folder named “BasicAttributes”
- Right-click project name in solution explorer;
- add new folder;
- name of folder should be: BasicAttributes
- Add HTML Page Named Border to BasicAttributes folder
- Right-click BasicAttributes folder;
- add new item;
- Select HTML Page
- HTML Page name should be border
- Click on copy code in code below to copy code into HTML Page border.htm
- Right-click on HTML page border and select view in browser
Purpose: border=number Specifies the width in pixels of the border around the table and its cells. Set it to 0 to turn the borders off. Default is 1. Adding the word border without a value results in a 1-pixel border.
< !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Border Attribute Example</title>
</head>
<body>
<table border="10" width="300">
<tbody>
<tr>
<td>this
table has a border of 10 </td>
</tr>
<tr>
<td>this
table has a border of 10</td>
</tr>
</tbody>
</table>
</body>
</html> |
