Results 1 to 1 of 1

Thread: HTML Style Background Color

  1. #1
    Join Date
    Nov 2009
    Posts
    76,596

    Default HTML Style Background Color

    The background-color property defines the background color for an element:

    Code:
    <html>
    
    <body style="background-color:yellow;">
    <h2 style="background-color:red;">This is a heading</h2>
    <p style="background-color:green;">This is a paragraph.</p>
    </body>
    
    </html>

    The font-family, color, and font-size properties defines the font, color, and size of the text in an element:

    Code:
    <html>
    
    <body>
    <h1 style="font-family:verdana;">A heading</h1>
    <p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p>
    </body>
    
    </html>
    The font-family, color, and font-size properties make the old <font> tag obsolete.



    Example Page

    http://learnhtml.bizhat.com/example_003.html

    Source Code

    http://learnhtml.bizhat.com/example_003.html.txt
    Last edited by sherlyk; 03-31-2014 at 06:12 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •