Make Money Online!
Hi, I'm Ben and I own Create a Great Website! I'm currently earning well over $1,500 plus per month online in my spare time, and I want to show you how you can do the same.
Fill out the form below and I'll send you my free guide to create a great website and how you can earn money online just like I do! You won't be disappointed.
Make Money Online!
CSS Tutorials :
Style Sheet: Internal and External
When a browser is instructed to read a style sheet, it will format the associated page based on the defined style.
There are three ways to insert a style sheet into an HTML document:
- External Style Sheet
- Internal Style Sheet
- Inline Style
External Style Sheet
An external style sheet is a separate document from the web page. It is called using a link in the head section of the page. An external style sheet is ideal when the style is applied to many pages.
With an external style sheet, you can change the look of all of the pages in a website using the style sheet by changing one file. Each page that uses an external style sheet must link to style sheet using the <link> tag. The <link> tag goes inside the head section.
<link rel="stylesheet" type="text/css" href="mynewstyle.css" />
</head>
You can use any text editor to create an external style sheet. Dreamweaver works great, but so does Notepad and Wordpad on a PC or any text editor on a Mac. Your style sheet should be saved with a .css extension. An example of a style sheet is shown below.
Example: Shows the application of style properties to the horizontal rule element.
p {margin-left:35px;}
body {background-image:url("images/bgtop.gif");}
Note: You should not leave any spaces between the property value and the units. For example, don't leave a space between the 35 and the px. It must be written as 35px. Some browsers will not recognize the value when there is a space between it and the property.
Internal Style Sheet
An internal style sheet should be used when a single document has a unique style. Internal styles are defined in the head section of the HTML page by using the <style> tag. Here's an example.
<style type="text/css">
hr {color:blue;}
p {margin-left:25px;}
body {background-image:url("images/backbgvert2.gif");}
</style>
</head>
Inline Styles
An inline style loses many of the advantages of style sheets by mixing content with presentation.
To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph.
Share this Webpage
This site proudly build with Site Build It!





