Html, choosing the font

Let’s start this lesson by analyzing fonts, a fundamental part of the content of a web page. Let’s see how to choose the right font and set it for the text contained in our web page.

Programmazione HTML
Programmazione HTML

Before diving deeply into this topic, it is important to know that even if you have very beautiful and decorative fonts available, it is best not to use them because users visiting your site who do not have that specific font in their Windows font folder will never see it, and the result will be the display of a very simple Times New Roman.

That said, I briefly summarize that the fonts to use for your web pages should fall among these types: -Verdana -Georgia -Arial -Sans-serif -Trebuchet MS -Courier -Times New Roman – Helvetica keeping in mind that the main characteristic of the font must be “legibility”.

For our index.html page, we will use the font Verdana because it is very readable and at the same time pleasant. We set the main font for our web page as “Verdana” using the new tag font face.

Here then is the new tag in action: The font face tag also uses a closing tag.

Let’s see then how to insert our first line of text on our web page: Here is my first text To make sure the typed text is in Verdana, it must be written between the tags and .

But what if a user does not have the Verdana font installed on their PC…what should I do? Good question! There is a solution for everything…we insert multiple font types in the tag!

"verdana,arial,helvetica,courier">

Here is my first text

Clearly the first font is Verdana, but if the user does not see it, they will see the text written in Arial…and so on! Shall we play a game?

Let’s use all the font types to see what effect they have on our page. Here’s how:

Here is my first text Here is my first text Here is my first text Here is my first text Here is my first text Here is my first text

Well…it was just a way to better explain how to write the tag that specifies the font so as to understand the opening and closing.

Pubblicato in

Se vuoi rimanere aggiornato su Html, choosing the font iscriviti alla nostra newsletter settimanale

Be the first to comment

Leave a Reply

Your email address will not be published.


*