1
Placement of stylesheet on Sun Oct 10, 2010 2:50 am
Unknown Data
Registered Member

Placement of stylesheet Learn CSS - part 3 |
Placement of stylesheet A stylesheet can either be placed inside the HTML document or as a separate file. Is our stylesheet placed inside the HTML document are there two additional options for placement. Below are listed the three opitions for placement of a stylesheet. • External stylesheet • Internal stylesheet • Inline Style External stylesheet An external style sheet is ideal to use, when you have a desire to be able to change, a complete web ite that contains many pages. There is only one place that must be modified to achieve this effect. To do this, must the HTML document be connected to the stylesheet via the following tag <link>. The tag is placed in the HTML document headers as shown in the example.
The following stylesheet (stylesheet.css) could look like this:
It is now the browser's task to read "stylesheet.css" and format the displayed HTML document after this. A stylesheet document is always stored with the last name ".css" Internal stylesheet By using a internal stylesheet are we putting this tag in the header <style>. This kind of style sheet is used for documents, where you have a preference for a particular layout, which is only applicable to this document. We could also take a look at a example below here.
A browser reading a website are normally ignores unknown tags. Browsers of an earlier date could not read the <style> tage, so this results in that the content is displayed on the screen. To avoid this are we adding "<!--" and "-->" - the HTML comment characters. Inline style Inline style is used inside a normal tag. This type is used, when you want a particular property which applies only to one special thing. Here is an example:
Now you've got an insight into the different types of style sheets. The use of individual sheets each have their advantage. Whether you are using external, internal or inline style depends on you. But try to go to the next lesson, here you can see how the use of external, internal and inline style work in combination. |
| Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators. |


Home


