Altering Font Color in HTML: A Guide – this is the

Feedback


Question:

I have a code that I want to use to alter the font color of a paragraph.



    

Va', pensiero, sull'ali dorate. Va', ti posa sui clivi, sui coll, ove olezzano tepide e molli l'aure dolci del suolo natal! Del Giordano le rive saluta, di Sionne le torri atterrate. O mia Patria, sì bella e perduta! O membranza sì cara e fatal!...

What measures can I take to display it in different hues?


Solution:

There are various methods to achieve this. One approach is to select a color from a list of pre-defined options (such as those found on http://www.w3schools.com/html/html_colornames.asp), while another is to specify your own color using a hex code (which can be found at sites like http://html-color-codes.info/webfarben_hexcodes/).

Inline CSS

Blue inline CSS font

Internal CSS

To format all your specified elements, simply define a style element in the head section.


Blue!

External CSS

The process is similar to
Internal CSS
, but instead of defining the style in the head section, you link a
CSS file
.

The most popular approach for CSS styling involves caching the file in the browser, resulting in a decrease in page
load time
. One way to link to the file is by loading a
CSS File
.


Old depricated way

Blue font

or

Selfdefined blue text

Frequently Asked Questions