Font Families

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

No — even though both <em> and <i> may be set with the same type the tags do not match. All the text starting with the <em> will come out emphasised.

Font Families

Often Web pages do not pick the particular font family that the browser uses. For example, unless otherwise specified, most browsers use the "Times Roman" family of fonts. However, the user (you) can set the preferences otherwise, and a file called a "style sheet" can also specify particular fonts. Or you can change the size of the fonts used to display a page (look at the "View" menu option of your browser.)

Note: If you have not done so, find the preferences menu of your browser and change the default fonts.

  • In Firefox, go to Tools/Options/Content
  • In Explorer, go to Tools/Internet Options/General/Fonts

Your best choice for "variable width font" ("proportional font") is a sans serif font such as Comic Sans MS or Helvetica. With a sans serif font characters do not have the little extra bits ("serifs") at their ends.

The illustration shows fonts with and without serifs. Serifs improve ease of reading in printed text, but with bit-mapped graphics (graphics made up of little dots, such as on your monitor) serifs do not come out as well and make reading more difficult.

Sometimes a Web author wants to use a particular font no matter what the user's preferences. A trick for doing this is to include the text as an image file. That is what was done here..


QUESTION 16:

Why is it a bad idea to make all text an image file so a Web author has exact control over what the browser displays?