HTML Lesson 8: Font


Introduction to HTML Font

In this lesson you will learn about another exciting lesson of HTML. Font is the most important thing in a Web content. You should use a simple and readable font. However, you can manage size, color and font face.

font face

Normally the default font is ”Times New Roman”. However, you can use any font you like to use. In HTML, the best practice is to use minimum 3 Fonts of same family rather than 1 font. In case the browser doesn’t support one Font it could load the others.

Please note: The font family should be the same. You can not mix serif and sans-serif fonts in one code.

font size

Font size is defined in numbers i.e. from 1 to 7. The default font size is 3. Higher the value higher the font size.

Source Code Output
Wikiprogramming HTML tutorial

Important Note: Higher font value often use for the heading with bold tags. For website content, try to use the font size which is readable to user.

font color

You can set the Font color of font. Most appropriate approach is to define in HEX color code. You will learn in detail about what is HEX color code and what are the other methods to show code in HTML Color Lesson. But for now just focus on font property

Source Code Output
Wikiprogramming HTML tutorial

first letter capital

You might have seen that the content of magazine and book has a first letter capital. So if you are creating a webpage of magazine or book and want to have a first letter capital then HTML Font also allows you to make the First letter capital. Here is a demonstration for you

Source Code Output
Wikiprogramming HTML Tutorial.


  • Font make content readable.
  • Use font face to change Font family.
  • Define font color of text.
  • Try font size to change the size of font.

Next Lesson

In the next lesson you will learn about how to add comments in HTML. Stay tuned! See you in HTML Comments lesson.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.