HTML Tutorial |
Lesson 5 | ||||
Home Introduction to HTML <html> to </html> <body> to </body> Formatting Links Backgrounds Tables Frames Other tags A little Style Resources |
• Tags covered in this lesson: • Explanation: • Working examples: Tags covered in this lesson: Actually they are not tags, they are attributes for the <body> tag. Their job is to provide a background to the page. bgcolor="#ffffff" This is how we use the "bgcolor" attribute:<html> <head> <title>This is my First html Page</title> </head> <body bgcolor="#cccccc"> <h1>My First Page</h1> <p>This, as the <i>title</i> suggests is my <b>First Page</b>.</p> <p>I am learning HTML and am going to master it.</p> <p>Teach me <u>more</u>.</p> </body> </html> The bgcolor="#cccccc" colours the page grey. This is called a "hex colour". You can use any hex colour. There are ample resources on the web that will give you more information on this. Some links for web safe hex colours can be found in the Resources page at the end of the lessons. background="some image" This is how we use the "background" attribute:<html> <head> <title>This is my First html Page</title> </head> <body background="complete path of the folder the image is in & the image name with its extension"> <h1>My First Page</h1> <p>This, as the <i>title</i> suggests is my <b>First Page</b>.</p> <p>I am learning HTML and am going to master it.</p> <p>Teach me <u>more</u>.</p> </body> </html> Complete path means the foldername/the sub-folder name (if any)/imagename.ext. Extension is the three or four letters that appear after the period. This could be ".gif" or ".jgp" or ".jpeg" or ".png" etc. In our example I am using an image called "bg.gif". • FirstPage8.html • FirstPage9.html |
Home | Introduction to HTML | <html> to </html> | <body> to </body> | Formatting | Links | Backgrounds
Tables | Frames | Other tags | A little Style | Resources |