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 Size Codes

 
<font size="font size">...</font>
Here's a rundown on all the various HTML font size codes you can use to make text bigger or smaller on your web pages.

First of all, you can designate the text size on your web page using the 'size' attribute in the HTML font element code. If no size is defined for text on a web page then the web browser will display the text at size 3.

The value that you enter for the size attribute is a number representing any one of seven different relative sizes. These number 1 through 7 respectively. These are the results you will get when specifying the size attribute:

This is Size 1.

This is Size 2.

This is Size 3.

This is Size 4.

This is Size 5.

This is Size 6.

This is Size 7.


To apply your selected font size, simply enter the attribute-value pair:
size="font size"
...into your <font> tag where font size equals any number from 1 to 7.

Example:


<font size="4">Your visible text goes here and will look like this.</font>



Alternatives


Another way of designating your text size is to enter a number from 1 through 4 which either adds or subtracts from your basefont size. In the absence of a basefont declaration, the default basefont is size 3. By entering a value of "+1" for the size attribute you designate your text to be displayed one size bigger which then equates to size 4. Likewise a value of "+2" equates to font size 5. Going in the other direction, a value of "-1" equates to size 2 and "-2" equates to size 1 (basefont size 3 - 2 = font size 1).

Many WSYIWYG editors produce source code using this system of font sizing. This should help explain things if you ever decided to take a peek at the source code while using a WYSIWYG editor and subsequently wondered what all that "+2" and "-1" stuff was about.

Still another way of defining your text size on a web page is to use the big and small font style elements. This system works very similar to the size=±1 system in that using one set of <big>...</big> tags equates to one size bigger while using one set of <small>...</small> tags equates to one size smaller.

Hence, if you were starting from a blank web page with no formatting applied yet (default basefont size 3), the following three examples will produce identical results:


<font size="4">Same as it ever was...</font>



<font size="+1">Same as it ever was...</font>



<big>Same as it ever was...</big>



Nesting a pair of <big>...</big> tags one within the other and using this to format text has the same effect as rendering the text two sizes bigger or, in effect, using the size="+2" attribute-value pair with the font element.

Hence, the following three examples will produce identical results:


<font size="5">Three of a kind all over again.</font>



<font size="+2">Three of a kind all over again.</font>



<big><big>Three of a kind all over again.</big></big>


Many WYSIWYG editors use this big/small font sizing system as well. This is one of the drawbacks of using these 'instant cakemix' web authoring programs. They can at times produce some very bloated and messy source code. Using one of these programs, when the user highlights the text he wants to make really big and then clicks four times on the make-text-bigger button (quite often denoted by an a+ button on the user interface), the resulting source code will look like this:


<big><big><big><big>Your really big text.</big></big></big></big>


This is rendered much easier by simply putting:


<font size="7">Your really big text.</font>



An even more ridiculous scenario is produced when the WYSIWYG user highlights some text he would like to make bigger and then, for example, clicks three times on the make-text-bigger button but then later changes his mind and decides some previously typed text would be better at the original size. So then —often unaware of what he is really creating behind the scenes in the source code— he goes back, highlights that text and clicks three times on the make-text-smaller button producing a bunch of source code that is a complete waste of space:


<big><big><big><small><small><small>No sizing will be applied to this text..</small></small></small> ...while this text will appear at size 6.</big></big></big>


This is exactly the same as simply putting:


No sizing will be applied to this text... <font size="6"> ...while this text will appear at size 6. </font>



Once you've tried to debug a web page stuffed to the gills with this kind of useless source code á la <big> <big> <big> <small> <small> <small> </small> </small> </small> </big> </big> </big> <big> <small> </small> <big> etcetera, ad nauseum, you may give some second thoughts as to how "easy" some WYSIWYG editors really are.

So what size text should you use? This is partly a matter of taste and partly a matter of necessity and can also depend on what font style you use.


Text that is too small can be difficult and sometimes even impossible to read (Arial size="1").


On the other hand, text that is too big can have the effect of 'shouting'. This can turn viewers away from your web page, especially if the whole page is filled with text like this (Arial size="6").


Most web page authors tend to hang around the size 3 - size 5 range for normal reading purposes (depending on the font style) but may increase the font size for headers and titles.


Now let's move on to learning how to set the font style 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