Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Formatting Text with Style Sheets > Add a Background Color to Text

10.11. Add a Background Color to Text

You can use the background property to change the color that appears behind text, tables, or other elements on the page. For example, you can change the background color for a block of text or a data cell in a table. You can specify one of 16 predefined HTML colors, a hexadecimal color value, or an RGB value.

Use caution when assigning a background color to an element, taking into account the color of the text in the foreground.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint