lecture menu |
lecture 2: fonts and coloursTwo things commonly done with styles are to change the font, or typeface of text, and the colours of the web page. You will have seen that both beige.html and blue.html differed from each other in these ways. Although we will be covering these briefly on this slide you should ensure you read the relevant topic pages properly after the lecture has finished. These are important topics and you do need to understand them. 1. colours
2. fontsThere are many different named fonts but they can be divided into three broad categories:
It is important to realise that many fonts are not loaded up into browsers. Therefore, you can never be sure that your page will be rendered in the intended font (although all the above named ones are pretty standard). When defining fonts you always need to provide a list: again, see the sample style sheets for examples. This is discussed in more detail on the teaching materials page about fonts. The style sheet property for defining fonts is font-family. PRACTICAL EXERCISE: try changing the fonts in "my.css" if you have successfully created it. The font names given in the paragraphs above should work on almost all browsers. |