HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 10. FONT FAMILIES 111


font-family: 'XXX', sans-serif;


Here, XXX would be the requested font, and sans-serif would be the fallback
font, which is one of the five fonts guaranteed to be available.


Here are a few fonts from Google that caught my eye: UnifrakturMaguntia,
UnifrakturCook, New Rocker, Sancreek, Seaweed Script, Miltonian, Mono-
ton, Smokum, Nosifer.


10.6.2 Web Fonts: fonts.com (Paid)


If there is a particular font that you just have your heart set on, it is likely
to be available at fonts.com.


http://www.fonts.com/web-fontshas over 20,000 web fonts available for
your use. Their free plan allows you to use any of 3000 fonts for up to 25,000
pageviews per month. They also have paid plans that offer more fonts and
more pageviews.


10.7 Special Glyphs


If you are quote-marking the value of an attribute, and it needs to include
the same kind of quote mark in the middle, unless you do something special
that interior quote mark will be treated as an ending quote mark, and then
things will get confusing.


In some computer languages, you can escape the normal meaning of a special
character by putting\right before it. This is not supported by the HTML
standard. Instead, you can use a “character reference” which is an alternate
way to specify a character.


<... attribute="a"c" ...>(bad)


<... attribute="a"c" ...>(good)


Many unusual glyphs (characters) can be inserted into your webpage by
using character references.


There are character references for things like copyright and registered trade-
mark and special symbols. There are thousands of these character references
supported in HTML.


&– Character references always start with an ampersand.

Free download pdf