Download ArticleDownload Article

This How.com.vn teaches you how to change font color in your HTML document. While the HTML font tag is obsolete in HTML5, you can use CSS to add color to your HTML page's text. If you're working with an older version of HTML, you can use the HTML font color tag as needed.

Method 1
Method 1 of 2:

Using CSS

Download Article
  1. How.com.vn English: Step 1 Pick a color for your text.
    While you can use basic colors (e.g., "red") to color your text, you'll need to use an HTML color generator for more nuanced shades:
    • Go to https://www.w3schools.com/colors/colors_picker.asp in your computer's web browser.
    • Select the base color you want to use in the hexagon at the top of the page.
    • Scroll to the shade you want to use on the right side of the page.
    • Note the six-character code to the right of the shade.
  2. How.com.vn English: Step 2 Open your HTML document.
    This should be the document for which you want to change the font color.
    • If you don't yet have an HTML document, create one before proceeding.
    Advertisement
  3. How.com.vn English: Step 3 Find the text you want to color.
    Scroll through your document until you find the paragraph, header, or other form of text that you want to color.
  4. How.com.vn English: Step 4 Note the text's tags.
    For example, if the text is a header, you'll see "<h1>" in front of it.
  5. Step 5 Add the "head" and "style" sections to the top of the document.
    You'll do this by typing <head> below the "<html>" tag, pressing Enter, typing <style> below the "<head>" tag, pressing Enter twice, and typing in the closing tags for both. Your end result should look like this:
    <!DOCTYPE html><html><head><style></style></head><body>
  6. Step 6 Enter the "color" style tag.
    Click the space between the "<style></style>" tags, then enter the following code (making sure to replace red with your color code and "<h1>" with the tag for the text you want to color):
    <h1> {       color: red;}
  7. How.com.vn English: Step 7 Review your document.
    Your page header should look something like this:
    <!DOCTYPE html><html><head><style><h1> {       color: red;}</style></head><body>
  8. How.com.vn English: Step 8 Unify the body text color.
    If you want to make all of your document's body text the same color, enter the following code with your preferred color substituted for black:
    body {       color: black;}
  9. Advertisement
Method 2
Method 2 of 2:

Using HTML Tags

Download Article
  1. How.com.vn English: Step 1 Pick a color for your text.
    While you can use basic colors (e.g., "red") to color your text, you'll need to use an HTML color generator for more nuanced shades:
    • Go to https://www.w3schools.com/colors/colors_picker.asp in your computer's web browser.
    • Select the base color you want to use in the hexagon at the top of the page.
    • Scroll to the shade you want to use on the right side of the page.
    • Note the six-character code to the right of the shade.
  2. How.com.vn English: Step 2 Open your HTML document.
    This should be the document for which you want to change the font color.
    • If you don't yet have an HTML document, create one before proceeding.
  3. How.com.vn English: Step 3 Find the text you want to color.
    Scroll through your document until you find the paragraph, header, or other form of text that you want to color.
  4. Step 4 Add the open "font" tag.
    Click immediately left of the text you want to color, then type in the following (making sure to replace red with your preferred color):[1]
    <font color="red">
  5. Step 5 Close the "font" tag.
    Click the space to the right of the end of the text you're coloring, then type </font> there.
    <font color="red">This text is red!</font>
  6. Advertisement

Sample HTML Code

Community Q&A

Search
Add New Question
  • Question
    How do I use a color codes?
    How.com.vn English: Community Answer
    Community Answer
    You can use hex codes (e.g. #ff00ff), rgb codes (e.g. rgb(255,100,309) ), or web safe colors (colors that are just their name like 'red' or 'black'). You can use colorhexa.com to get color codes.
  • Question
    How do I change color:red to color:blue?
    How.com.vn English: Community Answer
    Community Answer
    As long as you are using a normal editor such as notepad, you can just go in and replace the word 'red' with the word 'blue'.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Video

      Tips

      • Old computer displays are limited to about 65,000 colors, and very old displays are limited to 256. However, over 99% of internet users will be able to see any color you specify.[2]
      • Try to make your page easy to read. Bright colors are hard to read on a white background, and dark colors are hard to read on a black background.
      • HTML color codes are broken up as follows: the first two characters refer to red hues, the second two refer to green, and the last two refer to blue. You can use anything from "00" to "99" to indicate how much of each color you want; using "FF" instead of a number calls the maximum amount of that color (for example, "0000FF" would be as blue as possible).
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      Advertisement

      About This Article

      How.com.vn English: Jack Lloyd
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for How.com.vn. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 629,869 times.
      How helpful is this?
      Co-authors: 47
      Updated: August 15, 2020
      Views: 629,869
      Categories: HTML
      Article SummaryX

      1.Select a color.
      2.Find the code for the color.
      3.Open the HTML code.
      4.Find the tag for the text you want to color.
      5.Enter the "color" style for that tag.
      6.Unify the body text color.

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 629,869 times.

      Reader Success Stories

      • How.com.vn English: Mike Ignoffo

        Mike Ignoffo

        Jul 6, 2017

        "Really good explanations of each step in the tutorials makes it so much easier for people like me who are just..." more
      Share your story

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement