Border Attribute Example – HTML Syntax – Border HTML Example

Border Attribute Example – HTML Syntax – Border HTML Example

Summary: – Illustrates the for the .
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:

  1. Use Visual Web Developer 2008
  2. 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.
  3. Add New folder named “BasicAttributes”
    • Right-click project name in solution explorer;
    • add new folder;
    • name of folder should be: BasicAttributes
  4. Add HTML Page Named Border to BasicAttributes folder
    • Right-click BasicAttributes folder;
    • add new item;
    • Select HTML Page
    • HTML Page name should be border
  5. Click on copy code in code below to copy code into HTML Page border.htm
  6. Right-click on HTML page border and select view in browser
  7. 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.

    View Example In Browser

    < !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>