Fonts are usually selected using {font-family} instead of <font face>, but the font names have not changed.

Text sizes are handled a little bit more flexibly in CSS (now THAT IS an understatement!). There are many ways to skin that particular cat, but the most common was is with “em”. One em equals 16 pixels, which is the default browser text size, so anything larger or smaller than ‘normal’ can be expressed using decimals, i.e.:

p {font-size:0.75em;}

H1 {font-size:1.25em;}

h2 {font-size:2em;}

and so on. If that is too much for you, CSS also recognizes good old percentages, and also absolute values such as pixels, points, picas, inches, et cetera…

{font-weight} is just the CSS way of saying Bold, one of the few instances where CSS is no closer to common language than HTML. CSS actually supports several shades other than normal and bold (including the temptingly-named lighter and bolder), but most browsers do not.

{text-decoration} includes overline, line – through, and underline, which all do pretty much what you would expect. You can also say {text-decoration:none;} which will remove all decoration, such as underlines from links.

{text-transform} is a sneaky little devil that changes your text’s case, i.e., capitalize will automatically make every first letter uppercase (which, by the way, is just asking for the grammar nazis, even if you use it for headlines and titles). There is also uppercase and lowercase, which changes every letter in your content respectively, and none, which does absolutely nothing (though it may be useful to exclude portions of your content from an inherited use of text-transform).

Unlike the prior link, this link matches the text color:

in order to create this kind of link you have to add style to the link. Within the < a style= " text - decoration: none; color : #match the color of the text; " href..etc....>

It is always good to look at examples of different styles that we are discussing here on real sites. Let us use online casino sites that specifically is for players in the United States. Many of these affiliate casino sites are pretty sophisticated as far as their css styling is concerned. Their primary objective is to funnel players through to specific online US player friendly casino sites. Some have loads of flashy images and banners. Most of these online gambling sites show examples of the Box Model as the display information for each of their featured casinos. The sites of the actual online casinos are really sophisticated as far as their css is concerned. Do a Google search for “online slots US” and check out some of these affiliates and their featured casinos. You might actually like some of what you see there – most of these sites use very high level design and css tricks to make the sites as inviting as possible. Who knows, you might even end up signing up and playing!

Leave a Reply

Your email address will not be published. Required fields are marked *