HTML
  Home arrow HTML arrow Page 4 - HTML Fonts, Styles, and Headers
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

HTML Fonts, Styles, and Headers
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2008-02-27

    Table of Contents:
  • HTML Fonts, Styles, and Headers
  • How to Set the Font of Text
  • How to Set the Color of Your Text
  • Styles in HTML/Working with CSS
  • Getting Inside Your Head

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    HTML Fonts, Styles, and Headers - Styles in HTML/Working with CSS


    (Page 4 of 5 )

    While CSS is too large of a subject to adequately cover here, I would like to show you a few examples of how it works. For those of you who are unfamiliar with CSS, it stands for Cascading Style Sheets, and allows you to control the style of all the pages (or just one if you like) on your website with a single page.

    Formatting <H> tags and <P> Tags


    <html>

    <head>

    <style type="text/css">

    h1 {color: red}

    h2 {color: yellow; text-align:center}

    h3 {color: blue; font-size:70}

    p {font-family:impact}

    </style>

    </head>

    <body>

    <h1>Peter Piper Picked a peck of Peppers</h1>

    <h2>Little Miss Muffet Sat on a Tuffet, eating her curds and whey</h2>

    <h3>I'm on writer's strike. Write your own limerick.</h3>

    <p>Gorilla. That is all.</p>

    </body>

    </html>

    In the above example we created the CSS inside of our page. You should only do this if there is only one page whose elements you wish to control with CSS.

    Referencing an Outside Style Sheet

    Style sheets are stored on the server, and you must call them within your HTML page to apply them. You do so with href, like so:


    <html>

    <head>

    <link rel="stylesheet" type="text/css" href="styles.css" >

    </head>

    <body>

    <h1>She's a maniac, maniac for sure.</h1>

    <p>And she's programming like she never programmed before.</p>

    </body>

    </html>

    For more information on CSS, you can view my series on the subject. It's well worth the read. I would venture to say its the best CSS tutorial in the galaxy, far better than that punk writer on Omegas Prime.

    More HTML Articles
    More By James Payne


       · Welcome to my article HTML Fonts, Styles, and Headers. As the title suggests, in...
     

    HTML ARTICLES

    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset
    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT