HTML "Graphics"
Websites that are composed entirely of text can be very boring. However, an excessive number of images can make the loading time of your page really long. But, some "visual effects" can be created using HTML and Cascading Style Sheets. Using Stye Sheets, you can create link buttons like these:
Comic Sans MS
Desdemona
Staccato
X-Files
You would need to put style and /style tags in the head of your document, then create classes for each of the links:
<style>
.link1, .link2, .link3, .link4 { text-decoration: none; font-size: 16pt; padding: 5px; }
.link1 { color: #630; background-color: #f90; font-family: Comic Sans MS, Arial; }
.link2 { color: yellow; background-color: black; font-family: Desdemona, Arial; }
.link3 { color: #f0f; background-color: #909; font-family: Staccato555 BT, Arial; }
.link4 { color: #0f0; background-color: #060; font-family: X-Files, Arial; }
</style>
|
When you create links in the body of your HTML document, include a "class" in the anchor tag:
<a href="fonts/Comic.ttf" class="link1">Comic Sans MS</a>
<a href="fonts/Desdemon.ttf" class="link2">Desdemona</a>
<a href="fonts/Staccato.ttf" class="link3">Staccato</a>
<a href="fonts/Xfiles.ttf" class="link4">X-Files</a>
|
Here is a basic breakdown of what each part means:
- .linkXXin the style sheet, you can change the effects of existing HTML tags, or you can create your own "tags"; the period before the name denotes this as being a tag that you have created, but you cannot use the same name as an existing HTML tag; also, you can edit more than one tag in a style sheet by placing a comma between the different tags you want to edit, as seen in the first line of the first chunk of code above
- paddingadds XX pixels (px) of padding around the text
- colorsets the color of the text
- background-colorsets the background color of the text
- text-decorationyour choice of one of the following:
- noneeliminates any lines associated with the text (and will remove the underlining of links)
- underlineplaces a line below the text
- overlineplaces a line above the text
- line-throughplaces a line through the text
- blinkwill annoy most people
- font-familysets the font of the text; be careful: not all computers may have the fonts you choose installed, so you may want to list more than one font, separated by a comma, as seen in the first chunk of code above
And you can see above what the different "buttons" would look like...
|