Chapter 6 An Introduction to HTML Pages
6-2 Tag Nesting You can put two tags together to combine the effects Bold and underlined But make sure the inner opening and closing tag are entirely inside the outside tags as shown above. This is wrong: Bold and underlined
6-3 Font size and color will change font color – There are 16 named colors on page 172 will make font bigger – will make font size 7 (the sizes go from 1 to 7) – will change font color and font size Closing tag is always
6-4 Colors Font Color – Font tags can use color name or hexadecimal code – – With the hex codes, you can use all 16 million colors, BUT – Not all colors display the same in every browser Browser Safe Colors 216 colors which display essentially the same in any browser Dithering Technique of mixing colors to reach a color between the colors a browser can display See link Ch 6d for an example
6-5 Font face will change font to Arial, but only if the viewer’s computer has that font installed
6-6 Font types Serif or Sans-Serif – Serifs are the little points at the corners Serif example –THE Sans-Serif example – THE
6-7 Font types Proportional or Monospaced – Monospaced characters are all the same width, like this iiiii mmmmm wwwww – Proportional fonts are narrower for some letters, like this iiiii mmmmm wwwww
6-8 Font face Good platform-independent font face lists: Browsers try the fonts listed in order
6-9 Tag Attributes The structure of an HTML tag may contain one or more attributes like this: –
6-10 Align Attribute – Centers a paragraph – Right-aligns a paragraph – Left-aligns a paragraph (the default setting) Align works the same on header tags And so on
6-11 Hypertext Links To make hypertext, use the anchor tag Click here to go to Yahoo – Text becomes blue and underlined (unless you specify some other color for links in the BODY tag) If you omit the the link goes to another page on your site Click to see page 2
6-12 Page Properties Attributes for BODY Tag – text Color for the text in the page – bgcolor Background color for the page – link Color for the hypertext links – vlink Color for the visited links – alink Color for the active link