Why capitalize name of font in font-family?


#1


I'm learning how to change font stuff in the html lessons.
It says this "Make sure to capitalize the first letter of Arial, Verdana, and Impact as shown!"
Why do we have to capitalize it? It seems to work either way. I thought HTML wasn't case sensitive?


#2

HTML element tag names and attribute names are not case-sensitive.

HTML element attribute values may be case-sensitive depending on their content.

In this case, the browser needs to check whether the font you have specified is installed on the user's computer. All font names are proper nouns, so when they are installed on your computer their names begin with a capital letter. Modern browsers when they look for the font should do a case-insensitive search, but just to be on the safe side, it's a recommended best practice to capitalize the first letter.


#3

Oh word
Thanks a lot! :slight_smile: I'm glad I asked. I want to develop good practices as I
learn. Saving this info for future reference.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.