Internal CSS Stylesheet
When creating a stylesheet internally in the web page, you will need to use the
<style></style> HTML tags in the Head section of your webpage. All the code for the Internal CSS stylesheet is contained between the <head></head> section of your websites code. Below is an example of what an Internal stylesheet looks like.<head>
<style type="text/css">
h1 {color:blue;}
h2 {color:red;}
p {color:green;}
</style>
</head>
External CSS Stylesheet
When using an external stylesheet you must reference the stylesheet in the HTML page that is using it. You would add the code below to your HTML document to reference a stylesheet in the same location as the HTML page called "style.css". You can upload the "style.css" page can be located anywhere in your files. You can name your stylesheet whatever you like and link to as many as you like. You can simply link to it in your head section and every edit your make to the "style.css" sheet will be globally changed through out the site. Below is what teh code looks like.
<head> <link rel="stylesheet" type="text/css" href="/support/style.css" /> </head>
Inline CSS Styles
The inline style uses the HTML "style" attribute. This allows CSS properties on a "per tag" basis. The following is an example of how the inline style is used.
<p style="color:red;font-size:18px">This is a paragraph!</p>
This inline style will change the color of the paragraph to red and make the font size 18 pixels.
Comments
Post a Comment