Do you want to use the newest technology to style your web pages? Here's how!

Steps

  1. 1
    Understand how css works with HTML. For example:
    <span style="(css)">Text</span>
    Almost any HTML tag can include "style," such as
    p
    or
    div
    What goes in between the quotes is the CSS part.
  2. 2
    To change text font, use css'
    font-family
    For example:
    <span style="font-family:times;">Text</span>
    will cause "Text" to use the Times font.
    Advertisement
  3. 3
    To set an order of preference, in case a particular font is not on a person's computer, use commas to separate font names. For example:
    <span style="font-family:times, georgia, serif;">Text</span>
    will cause "Text" to use the Times font. If times is not available, Georgia will be used. If neither Times nor Georgia are available, a generic serif font will be used.
  4. 4
    To set text color, use css'
    font
    For example:
    <span style="font:red;">Text</span>
    will cause "Text" to be red. You can use any valid HTML color name in the place of "red." You can also use a hex code. For example:
    <span style="font:#FFFFFF;">Text</span>
    will cause "Text" to be white.
  5. Advertisement

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 16 people, some anonymous, worked to edit and improve it over time. This article has been viewed 29,309 times.
How helpful is this?
Co-authors: 16
Updated: October 30, 2022
Views: 29,309
Categories: Markup Languages
Advertisement