"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

Web Development - Fonts

Tired of Adding FONT Tags Between Paragraphs?

Here's the scenario: You have five paragraphs on a webpage. You want the text in those five paragraphs to use a certain font, let's say Arial. The problem is that every time you make a new paragraph, you have to close the <FONT> tag before you can use the <P> tag. Then, you have to create a new <FONT FACE="arial"> tag for the next paragraph. Before you can do another paragraph break, you have to use another </FONT> tag.

This can get old very quick.

There are a couple of very sneaky ways to get around this trick. One is to use the <BASEFONT="arial"> tag near the top of your document. With some browsers, this will force all of the text on the webpage to use Arial as the default font.

The second trick is to use a WYSIMWYG (What You See Is Maybe What You Get(!)) web editor and use pulldown menus and such to define fonts.

The last trick, one I personally use, is to forget the <P> tag when defining paragraph breaks. Instead, I use a <BR> tag, an ampersand character, the letters 'nbsp', a semicolon, and another <BR> tag. This 'simulates' a paragraph break, but it does not force you to close the previous paragraph's <FONT> tag. This tip may not be recommended by some HTML experts, so I am leaving the implementation up for you to decide.

(I bet a lot of you are saying "Andrew, why all those weird characters between the two <BR> tags?" Some browsers, including Netscape, will not render two <BR> tags correctly. They render multiple <BR> tags as if you only put in one <BR> tag. Thus, there would not be a space between your 'paragraphs.' The characters I mentioned above are the HTML code for a non-breaking space. This makes Netscape and other such browsers think there is really some text between the two <BR> tags, and it will render your pseudo-paragraph break correctly. And before you ask, no you can not just put a space between both <BR> tags - you must use the non-breaking space. Sorry.

Return to the Web Development - Fonts page.

Print this tip


Get the Newsletter

Thanks For Sharing!



Newest Tips:

Microsoft Word 2010
Make Sure Others Can See Your Fonts
Microsoft PowerPoint 2010
Animations or Video Displaying Poorly?
Google Chrome
[MODIFIED] Report a Malfunctioning Web Page, Crash, or Other Issue
Google Gmail
Show Unread Message Count as an Icon

Follow Us!

About MalekTips and the Author

The MalekTips website was created in 1998 by Andrew Malek of Envision Programming. The page's goal is to freely disperse computer-related tips, hints, and informative articles. Tips are organized to be easy to find, and are presented clearly, in easy-to-understand language. MalekTips also provides information and links to public-domain, open source, freeware, shareware, and commercial software available for download. < more >