How to Change Font Color (CSS)

One of the easiest ways to give your website a little life is to play with the style of the text. To get started, change font colors using CSS.

Instructions

    • 1

      Start with an opening tag. When you have finished your code, end with a closing tag. Copy and paste the tags below to get started:

      <style type="text/css">

      </style>

      Everything that you write using CSS must be between these two tags to work.

    • 2

      Change your font color. This code makes the text on the entire page change from standard black to whatever color you choose. This code must be between your opening and closing CSS tags:

      body {
      color: #HEXCODE;
      }

      Replace #HEXCODE with the six-digit hex color code that matches what you want to change your font color to, for example, #FF8800. Include the # sign before the six-digit hex code.

    • 3

      Change the font color of sections of text. For instance, create a table and change the font color of the table to differ from the font color for the rest of your website.

      table {
      color: #HEXCODE;
      }

      Apply font color changes to certain sections of your website using DIVs:

      #divname {
      color: #HEXCODE;
      }

      Change "divname" to whatever you would like to name your DIV. The # is necessary and should come before the DIV name.

    • 4

      Change the font color of one word, one line or one paragraph. For this code, you do not use opening and closing CSS tags; instead, these tags act as their own opening and closing tags, with the different-colored text going in between them.

      <font style="color: #HEXCODE;">Your text goes here.</font>

Related Searches:

Comments

You May Also Like

  • How to Set a Font Color in CSS

    CSS stands for Cascading Style Sheets. Web developers use CSS to separate the structure of their HTML code from its presentation. Your...

  • Definition of Font Color CSS

    CSS or cascading style sheets are tools Web designers use to create Web pages. CSS is scripting code that can be used...

  • How to Change Color Font

    When creating a website, changing font color is a part of the design phase for each page. Font colors can be changed...

  • How to Change Text Color With CSS

    CSS (cascading style sheets) lets you add style, such as text colors, background colors, fonts and formatting. If you can grasp HTML,...

  • How to Change the Font Color of an HTML Table

    There are two ways to change the font color of a table created with HTML. If you want to change the color...

  • Fonts to Use for CSS

    Fonts to Use for CSS. CSS, or Cascading Style Sheets, govern the appearance of the text that is on a web page....

  • How to Embed Fonts Using CSS

    When you embed a font in a Web page, you assign the chosen typeface to the content so that it automatically displays...

  • How to Change Font Colors With Javascript

    Using JavaScript, a web developer can dynamically modify content and style attributes on a web page. Changing the color of a piece...

Related Ads

Featured