Friday, 20 February 2015

FONTS AND FONT SIZES

 The <font> tag, part of HTML 3.2 but deprecated in HTML 4.01 (again, in favor of style sheets), is used to control the characteristics of a given set of characters not covered by the character styles. Originally, <font> was used only to control the font size of the characters it surrounds, but it was then extended to enable you to change the font itself and the color of those characters.

CHANGING THE FONT SIZE

The most common use of the <font> tag is to change the font size of a character, word, phrase, or any range of text. The <font>…..</font> tags enclose the text, and the size attribute indicates the desired font size. The values of size are 1 to 7, with 3 being the default size. consider the following example:

<p> bored with your plain old font?

<font size=”5”change it.</font></p>

Figure 6015 shows the typical font sizes for each value of size.

 You can also specify the size in the <font> tag as a relative value by using the + or- characters in the value for size. Because the default size is 3, you can change relative font sizes in the range from -3to +4,as in the following:

<p> change the <font size=”+2”>font</font> size again.</p>

Here, the word font(inside the <font> tags) will be two size levels larger than the default font when you view the example in a browser that supports this feature.

Relative font sizes are actually based on a value that you can define by using the <base font> tag, another tag that’s deprecated in the HTML 4.01 specification. The <base font> tg also has the required attribute size, which can have a value of 1to 7. All relative font changes in the document after the <base font> tag are relative to that value.

It’s also important to note that the available font sizes- 1 through 7 are completely arbitrary. They’re not tied in any meaningful way to real point sizes or any other standard metric for font size. Users can choose any font size they like. And all the sizes available to <font> are applied relative to that size. Various operating systems also display fonts in you can’t really count on much consistency when it comes to fonts.

CHANGING THE FONT FACE


Netscape introduced the <font> tag to HTML with its 1.0 browser. Microsoft’s internet explorer, playing the same game, extended the <font> tag to include the face attribute. The tag was made a part of HTML 3.2 ,but with HTML 4.01, the preferred method is to use style sheets to specify the fonts you use.

And face attribute takes as its value a set of font names, surrounded by quotation makes and separated by commas. When a browser that supports fact interprets a page with face in it. it searches the system for the given font names one at a time,. if it can’t find the first one, it tries the secondhand then the third, and so on, until it finds a font that’s the first one, it tries the second, and then the third and so  on, until it finds a font that’s installed on the system. If the browser can’t find any of the listed fonts, the default font is used instead. So, for example, the following text would be rendered in future. If future isn’t available, the browser will try Helvetica; it will then fall back on the default if Helvetica isn’t available.

<p><font face=”future, Helvetica”> sans serif fonts are fonts without  the small “sticks” on the strokes of the characters, </font></p>

Many fonts have different names on different systems; for examples plain old times is times on some systems, times roman on other s, and times new roman elsewhere.

Because the names of fonts vary from system to system and because the list of installed fonts varies on a per-user basis, most browsers enable you to specify font families as well as specific font faces in your lists of fonts. The two families that are usually supported are serif and sans-serif . usually you tack one of these two families onto you font list in case none of the other fonts you specified were there. for example, if you want to present a headline in a sans serif font, you might specify a font that’s available under the Mac OS, one that’s available under the X window system, and one that’s available under Microsoft windows, and follow that up with sans-serif in case the others aren’t available:

<font face=”Geneva, Helvetica, Arial, sans-serif”><h1> today’s news </h1></font>

No comments:

Post a Comment