To request editing rights on the Wiki, click here.

Help:Wiki University Wikitext--Font Colors

From FamilySearch Wiki
Jump to navigation Jump to search

Lessons


Intermediate


Advanced


Flexbox


Additional Helps

Change font color[edit | edit source]

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 256.
  • However only 140 names are supported by ALL browsers. Here's the list found in w3schools.com.

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[edit | edit source]

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


Quick Quiz
  • You can use any common name 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