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 / 11
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

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

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




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