How To Set The Colors On A Webpage - The Body Tag Attributes

How To Set The Colors On A Webpage - The Body Tag Attributes
You can set the color of the background, links and text on your webpage with the body tag attributes.

  • Bgcolor Attribute
    To set the background color for a webpage use the code below and replace the ffffff with the HTML color code for the color you wish to use. Place the code segment inside the opening <body> tag on your webpage.
    bgcolor="#ffffff"


  • Background Attribute
    To use an image as the background of a webpage use the code below and replace the image.gif with the name of the image you wish to use. If the image is in a subfolder, put the name of the subfolder before the name of the image and separate them with a /.

    folder/image.gif

    Place the code segment inside the opening <body> tag on your webpage.
    background="image.gif"



  • Text Attribute
    To set the color for the text on a webpage use the code below and replace the 000000 with the HTML color code for the color you wish to use. Place the code segment inside the opening <body> tag on your webpage.
    text="#000000"


  • Link Attribute
    To set the color for the links on a webpage use the code below and replace the 000000 with the HTML color code for the color you wish to use. Place the code segment inside the opening <body> tag on your webpage.
    link="#000000"


  • Alink Attribute
    To set the color for the active (clicked on) links on a webpage use the code below and replace the 000000 with the HTML color code for the color you wish to use. Place the code segment inside the opening <body> tag on your webpage.
    alink="#000000"


  • Vlink Attribute
    To set the color for a visited link (a link already used) on a webpage use the code below and replace the 000000 with the HTML color code for the color you wish to use. Place the code segment inside the opening <body> tag on your webpage.
    vlink="#000000"





This site needs an editor - click to learn more!



RSS
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map





Content copyright © 2022 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.