www.pickatutorial.com Computer Tutorials
Top eBooks: C/C++ | C# | Android | Mathematics | Database | Cloud | Graphics | Networking | Oracle | Hardware | AI
Top Tutorials: C/C++ | C#.NET | PHP MySQL | Java | Java Script | jQuery | HTML | xHTML | HTML5 | VB Script| CSS
Lessons Basefont Tag Bookmark and Share
Tutorial Home
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Lesson 14
Lesson 15
Lesson 16
Lesson 17
Lesson 18
Lesson 19
Lesson 20
Lesson 21
Lesson 22
Lesson 23
Lesson 24
Lesson 25
Lesson 26
Lesson 27
Lesson 28
Lesson 29
Lesson 30
Lesson 31
Lesson 32
Lesson 33
Lesson 34
Lesson 35
Lesson 36
Recall from the previous lesson where we learned that the <font> tag is used to control the font face, size and color of the text written between <font> and </font> tags. But, what if you need to control the font properties of the whole html web page. If you are thinking that you would open the <font> tag just after the <body> tag and close the font tag i.e. </font> just before </body> tag, you get full marks. But what if you need to use arial as your html web page's default font, and courier font at selected places. You may still use <font> tag to achieve this, but don't you think that your web page's code would become a bit messier. So, what is the solution?

<basefont> tag solves our above problem. The <basefont> tag can be used to control the font face, color and size of a web page's text. When you use <basefont> tag to set the default text properties, you can always use <font> tag to switch to another font and when you close the </font> tag, the properties you set with the <basefont> are applied again, automatically.

<basefont> tag has no closing tag. In current day's browsers this tag works fine, no matter whereever you use it. However, it is recommended that you use this tag anywhere before <body> tag.

Example:

<basefont color="pink" size="5" face="Courier New, Courier, mono">

The above code sets the default text color to pink, its size to 5 and the font face is set to Courier New, Courier, mono.

You can play with <basefont> tag's color, face and size attributes.


Next >>> Lesson No. 7: The Body Tag





Home - Advertise - Contact - Disclaimer - About Us
© Since 2006 pickatutorial.com -- All Rights Reserved.