Help:Wiki University HTML-- Font Colors

From FamilySearch Wiki
Jump to: navigation, search
MAIN PAGE
WIKI
WIKITEXT
HTML/CSS
FAMILY HISTORY CENTERS
VISUAL EDITOR

Lessons


Flexbox/CSS Grid

Additional Helps

CHANGE FONT COLOR

Changing colors.jpg

Sometimes you may want a different color for the font for emphasis. This is the attribute:

<p style="color:blue">

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce elementum efficitur faucibus. Curabitur eleifend quis ligula ac ullamcorper. Curabitur eget suscipit turpis.

  • The number of "named" colors is limited to 256 colors.
  • However only 140 names are supported by ALL browsers. Here's the list.

Html colors.PNG

Html7.jpg

You will also notice that alongside these "named" colors there is also a number value. This value is called a HEX number. You can use the HEX number instead of the name if you want. Sometimes the HEX code is shorter than the name of the color. Be sure to place the pound or hash tag # before the actual number. The computer will not process the HEX code without the # tag. The font color code using the HEX number would look like this:

<p style="color:#8A2BE2">

  • Click on the Shades column for more color selections. However, the shades do not have names so you will have to use the HEX codes.

TRY THESE OUT . . . . .

Tests.gif
Exercises
  • Change the lorem ipsum paragraph text to a color on this list.
  • Change the color of a header.


Quick Quiz
  • You can use any name that is common to everyone for a color.
A. True
B. False
  • If the HEX number does not work in the code you may have:
A. Used a wrong number
B. Left off the # tag
c. All of the above
  • You have to use the header tags to color headers
A. True
B. False

Navigation menu