Tuesday, May 27, 2008

Class 3 - Materials






A few quick shots:


To change the background image for a whole document:


<body style="background-image:url('blueswatch.gif');">


To change the font for a whole document put this line after the body tag:


<div style="FONT-family:times; font-size:18pt;color:white;">

A font-family is a prioritized list of font family names and/or generic family names . The browser will use the first value it recognizes so be sure to include enough description.

There are two types of font-family values:

  • family-name: The name of a font-family, like "times", "courier", "arial"

  • generic-family: The name of a generic-family, like "serif", "sans-serif", "cursive", "fantasy", "monospace".

Always offer a generic-family name as the last alternative.

Note: If a family-name contains white-space, it should be single-quoted.

<div style="FONT-family: ‘Comic Sans MS’,cursive; font-size:18pt;color:white;">

The line above will display Comic Sans or another cursive font if it is not available

To set the color and behavior of links in HTML

EXAMPLE:

In the head of your page put code like this to get white links, no underline and a change when the mouse is over them. When visited the link will turn red and when hovering the link will turn green. It will turn white after you click before the new page loads.

<Head>

<style type="text/css">

a:link {color:White;text-decoration:none;}

a:visited {color:red;text-decoration:none;}

a:hover {color: green;text-decoration:none;}

a:active {color:white;text-decoration:none;}

</style>

<head>

No comments :

Post a Comment

Note: Only a member of this blog may post a comment.