Home arrow HTML arrow Page 3 - HTML Fonts, Styles, and Headers
HTML

HTML Fonts, Styles, and Headers


In our last article we left off our discussion with how to work with images in HTML. In this article we will go over working with fonts, styles, and headers. There is plenty of ground to cover, so let's get to it.

Author Info:
By: James Payne
Rating: 4 stars4 stars4 stars4 stars4 stars / 5
February 27, 2008
TABLE OF CONTENTS:
  1. · HTML Fonts, Styles, and Headers
  2. · How to Set the Font of Text
  3. · How to Set the Color of Your Text
  4. · Styles in HTML/Working with CSS
  5. · Getting Inside Your Head

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
HTML Fonts, Styles, and Headers - How to Set the Color of Your Text
(Page 3 of 5 )

We set the color of our fonts using the color attribute. Here is an example:


<html>

<body>

<h1 style="color:black">Here is some black text</h1>

<h6 style="color:blue">Here is some blue text</h6>

<h5 style="color:purple">Here is some purple text</h5>

<h4 style="color:green">Here is some green text</h4>

<h3 style="color:yellow">Here is some yellow text</h3>

<h2 style="color:orange">Here is some orange text</h2>

<p style="color:red">here is some red text</p>

</body>

</html>

 

  Here is some black text

  Here is some blue text
  Here is some purple text

  Here is some green text

  Here is some yellow text

  Here is some orange text

    here is some red text

How to Set All the Properties of Your Font 

Here is how we set all of the properties of our font:

<html>

<body>

<p style="font-family:impact;font-size:90%;color:orange">

It was a dark and stormy night and I had forgotten my umbrella. The rain was messing up my hair, washing out the product I had spent two hours putting in and ruining my emo look.

</p>

<p style="font-family:webdings;font-size:110%;color:blue">

It was a dark and stormy night and I had forgotten my umbrella. The rain was messing up my hair, washing out the product I had spent two hours putting in and ruining my emo look.

</p>

</body>

</html>

And here it is folks, the results you've all been waiting for:

  It was a dark and stormy night and I had forgotten my umbrella. The rain was messing up my hair, washing out the product I had spent two hours putting in and ruining my emo look.

  It was a dark and stormy night and I had forgotten my umbrella. The rain was messing up my hair, washing out the product I had spent two hours putting in and ruining my emo look.


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials