There are 3 ways to add CSS into your web pages:
* External Style Sheets
* Internet Style Sheets
* Style Tags
External Style Sheets
These are style sheets saved as .css. You then link these into your page using the following tag.
<link href="global.css" type="text/css" rel="stylesheet" />
This style sheet is then included in your page when its in the browser.
Internal Style Sheets
This used a style tag, as you may have seen in serveral tutorials. Here is one we have for image rollovers.
<style type="text/css"> <!-- A {text-decoration: none} A:hover {text-decoration: underline; color: #0DC450} --> </style>
They are seperate from everything else but are included in the heag tag of your web page.
Style Tags
These are included inside your actual element. For instance if you wanted to change the border, of just one table, you could use the following code:
style='BORDER-BOTTOM: #84B953 1px solid'
This would just be included in the actual tag of your HTML element. Eg:
<table style='BORDER-BOTTOM: #84B953 1px solid'>...</table>
Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.
Tags: css, html, stylesheets
This entry was posted on Sunday, September 16th, 2007 at 7:48 am and is filed under Programming, Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.