Web Design Stuff
HTML Tutorials    CSS Tutorials    Web Hosting   Resources
Create a Web Page 101
Making Web Pages Intro What is a Web Page? Why Make a Web Page? The History of HTML Learn HTML or XHTML?
Basic HTML
Basic HTML Tutorials Basic HTML Necessities How to Make a Web Page How to Edit a Web Page The Basics of HTML Tags Basic HTML Page Structure HTML Attributes
HTML Font Codes
HTML Font Codes Intro HTML Font Color Codes HTML Font Size Codes HTML Font Style Codes HTML Bold/Italic Codes Combining Font Codes
Formatting Text
Formatting Text Intro Making Paragraphs Miscellaneous Formatting Headings & Subheadings Creating Hyperlinks
Using Graphics
Using Graphics on the Web Add Graphics to Your Pages Graphics and Accessibility How to Align Graphics Page Color & Background Graphics as Hyperlinks Horizontal Rules
Creating Tables
HTML Tables Tutorials HTML Table Fundamentals Background & Border Color Table Frames & Rules Table Width and Alignment Cells 1 -Space & Alignment Cells 2 -Row Column Span Cells 3 -Width & Height
Making Lists
HTML Lists Tutorials Bulleted Lists Numbered Lists Definition Lists
HTML Frames
HTML Frames Tutorials Using Frames for Layout Advanced Frame Layouts Putting Hyperlinks in Frames Frame Border Width Color, Margin and Control Problems with Frames SmartFrames: A Solution SSI: An Alternative to Frames
Web Page Forms
Making Feedback Forms A Simple Feedback Form Installing NMS FormMail Debugging Your Setup My Web Host is Out to Lunch User Input Components Text Fields Checkboxes & Radio Buttons Dropdown Menus Push Buttons Layout and Presentation
Basic CSS
Basic CSS Tutorials What is CSS? Why You Should Use CSS How to Use CSS Inline Styles Embedded Style Sheets External Style Sheets Class Selectors ID Selectors Combining Selectors
CSS Properties
CSS Properties Intro Font Styles Width, Height & Spacing Borders Backgrounds Position Float & Alignment Hyperlinks
All About Web Hosting
Hosting Your Own Website What is a Web Host? Your Website's Home Page Building a Website Offline About Free Web Hosting Best Free Web Hosting Commercial Web Hosting How to Get a Domain Name Ecommerce Web Hosting Web Hosting Terminology
Free Web Design Tools
Best Free Website Tools Best Free Text Editors Best Free Graphics Editors Free Website Analysis Tools
Setting Up HTML Kit
HTML Kit Introduction How to install HTML Kit Screenshot Breakdown Basic Configuration Overall Appearance Shortcuts and Startup Editing Window Customizing Toolbars Using the Favorites Tab Making a New Actions Bar Odds and Ends
Free Templates
Free Website Templates Two Column Fixed Width Three Column Liquid Layout Miscellaneous Templates Dynamic Menu Effects Two Column Experimental Terms of Use About These Templates
Website Templates Help
Getting Started Template Zip File Download How to Edit Your Template What to Edit in the HTML How to Add Your Logo Making a Website
Web Design Tips
Web Design Basics Tables vs. Tableless Using Tables for Layout Example Table Layouts World's Crappiest Web Page
Twitter Backgrounds
Twitter Backgrounds Intro Cool Twitter Backgrounds Cool Twitter Backgrounds 2 Plain Twitter Backgrounds Dark Twitter Backgrounds Best Twitter Backgrounds Cute Twitter Backgrounds Music Twitter Backgrounds Music Twitter Backgrounds 2 Twitter Backgrounds 101 TERMS OF USE
All About Web Browsers
What is a Web Browser? Mozilla Firefox Internet Explorer Opera How to Set Up Firefox Top 5 Firefox Extensions
 
Contact
Post Some Feedback Send Me An Email Iron Spider Blog About Iron Spider... Site Conventions
 
 
 

 

HTML Font Styles & Codes

 
<font face="font name">...</font>
On this page you'll find an overview of some commonly used HTML font styles and the codes that produce them.

To begin with, you can designate what font style, a.k.a., 'typeface', a browser will use to display the text on your web page using the face attribute in the font element. Theoretically, you can use any font that you have installed on your computer (if you are using Windows, you can see which fonts you have installed on your computer by browsing through your Fonts folder which is typically located at C:\Windows\Fonts).

HOWEVER, if you are creating a web page that you intend to make accessible to the World Wide Web, you must keep in mind that when other people view your web page, if they do not have your specified font installed on their computer then your web page's text will be displayed on their screen using their browser's default font. Incidentally, a browser's default font is also what is used when no font is specified in the source code of a web page. If you are using Internet Explorer, you can see what the default font is by opening Internet Explorer and then clicking on Tools » Internet Options » (General tab) Fonts.

Hence, for any web pages existing online, it is best to use fonts that most people are likely to have installed on their computer. Generally speaking, these web-safe fonts are: Arial, Verdana, Courier New, Times New Roman, Comic Sans MS.
This is Arial.

This is Verdana.

This is Courier New.

This is Times New Roman.

This is Comic Sans MS.

(For Mac users: The equivalent of Arial is 'Helvetica' and the equivalent of Times New Roman is 'Times'.)

The above five examples of font faces are all using the size=3 attribute. The type of font face you use will largely depend on the style of your web page and what level of professionalism you wish to convey. For a traditional or scholarly look, use Times New Roman. For a modern look, use Arial or Verdana. For an informal look, use Comic Sans MS. You should also bear in mind that different sizes affect the readability of different fonts. For example, several paragraphs of text using Arial rendered at size 2 may be perfectly readable but several paragraphs of text using Times New Roman rendered at size 2 may become tiresome.

To apply your selected font face, simply enter the attribute-value pair:
face="font name"
...into your <font> tag where font name equals the name of any official font.

Example:


<font face="times new roman">This text will be displayed using Times New Roman. </font>


The </font> end tag terminates your formatting instructions at which point you can declare a new set of <font>...</font> tags to display the text that follows in a different style.

Example:


<font face="times new roman">Here is some text using Times New Roman font face... </font> <font face="arial">Here is some text using Arial font face... </font>


You can also 'nest' <font>...</font> tags meaning that you place one set within the other. This has the effect of beginning one font declaration and then, before it terminates, a new or second font declaration begins. When the second font declaration terminates with its </font> end tag then your text returns to the original font declaration. In this manner your visible text 'inherits' font styles from all previous font attribute declarations (including size and color) until the associated </font> end tag terminates the declaration.

Example:


<font face="times new roman">This text is Times New Roman <font face="arial"> while this text uses Arial until the end tag is encountered</font> ...and now the text returns to Times New Roman.</font>



NOTE

For any font face value that has multiple words such as "Times New Roman" or "Comic sans MS", it is mandatory to place this value within double quotation marks ("..."). It's a good practice to place all attribute values within double quotation marks anyway since this will become the standard for future versions of HTML.
 
To ensure that a wide variety of computers with varying operating systems will display web pages as intended, some web authors make font face declarations in their source code using a comma-separated list of fonts. Macintosh computers may not have a typical PC font such as Arial installed and likewise PC computers may not have a typical Mac font such as Helvetica installed. Since Arial font looks like Helvetica, some web authors will make their font face declaration as follows:


<font face="arial,helvetica,sans-serif">Your computer will attempt to display this visible text using first the Arial font and then, if this is not available, using Helvetica. If neither Arial nor Helvetica is available then the computer will resort to the final choice, sans-serif.</font>


The third font choice, 'sans-serif', refers to a member of a generic font family and acts as a kind of fail-safe in case both Arial and Helvetica are unavailable.

Using this technique of listing fonts, some web authors will attempt to have their visible text displayed using a less popular font by placing this font first in the list thus taking the chance that the user might have it installed on their computer. Then if this fails, the user's computer defaults to the remaining choices in their font list which are typically representative of fonts that are more 'web-safe'.


Now let's learn how to make bold, italics and other font styles on your web page...


See also:
  • What is Web Hosting?
  • How to Make a Web Page






Best Free Stuff
for webmasters

Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates

See also:

Best Free Web Hosting

 

If you need a .COM web address, you can get one quick and easy at...

www.GoDaddy.com
<~ BACK TOP NEXT ~>
 
HTML Tutorials |  CSS Tutorials |  Web Hosting |  Domain Names |  Web Design Resources
Iron Spider © Copyright 2004-2011 Robert Darrell