Background Attribute Example – HTML Syntax – Background HTML Example
| .NET | .NET Programming (C# or VB) (Web or Desktop) | |||
| Key Supporting Languages | HTML | CSS | JavaScript | SQL Server |
| AJAX | ASP | Blogging | ColdFusion | mySQL |
| Perl | PHP | Ruby | Web Design | Web Dev |
Background Attribute Example – HTML Syntax – Background HTML Example
Summary: – Illustrates the HTML Syntax for the background 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 "BackgroundAttributes"
- Right-click project name in solution explorer;
- add new folder;
- name of folder should be: BackgroundAttributes
- Add HTML Page Named Abbr to BackgroundAttributes folder
- Right-click BackgroundAttributes folder;
- add new item;
- Select HTML Page
- HTML Page name could be bgcolor
- Click on copy code in code below to copy code into HTML Page bgcolor.htm
- Right-click on HTML page bgcolor and select view in browser
Purpose: bgcolor="color" or bgcolor="#rrggbb" Specifies the background color for an element.
| HTML | | copy code | | ? |
| 01 | |
| 02 | <html> |
| 03 | <head> |
| 04 | <title>Example For bgcolor</title> |
| 05 | </head> |
| 06 | <body> |
| 07 | <!--bgcolor="color" or bgcolor="#rrggbb"--> |
| 08 | <table bgcolor="red"> |
| 09 | <!-- row 1--> |
| 10 | <tbody> |
| 11 | <tr height="50px"> |
| 12 | <td bgcolor="blue">table |
| 13 | cell</td> |
| 14 | <td>table cell2</td> |
| 15 | </tr> |
| 16 | <!-- row 2--> |
| 17 | <tr colspan="2" bgcolor="green" height="50px"> |
| 18 | <td></td> |
| 19 | <td></td> |
| 20 | </tr> |
| 21 | <!-- row 3--> |
| 22 | <tr colspan="2" bgcolor="#ffff00" height="50px"> |
| 23 | <td></td> |
| 24 | <td></td> |
| 25 | </tr> |
| 26 | </tbody> |
| 27 | </table> |
| 28 | </body> |
| 29 | </html> |
| 30 | |
| 31 | |
| 32 |
Related posts:
- Alt Attribute Example – HTML Syntax – Alt HTML Example Alt Attribute Example - HTML Syntax - Alt HTML Example...
- Face Attribute Example – HTML Syntax – Face Attribute Example Face Attribute - HTML Syntax - Example...
- Border Attribute Example – HTML Syntax – Border HTML Example Border Attribute Example - HTML Syntax - Border HTML Example...
- Units Attribute Example – HTML Syntax – HTML Units Example Units Attribute Example - HTML Syntax - HTML Units Example...
- Bordercolor Attribute Example – HTML Syntax – Bordercolor HTML Example Bordercolor Attribute Example - HTML Syntax - Bordercolor HTML Example...
Related posts brought to you by Yet Another Related Posts Plugin.
