What is a Style Sheet ?
A design template used for defining the layout of multiple pages within a website, most commonly seen in the form of “CSS” (cascading style sheets).
In word processing and desktop publishing, a style sheet is a file or form that defines the layout of a document. When you fill in a style sheet, you specify such parameters as the page size, margins, and fonts. They are useful because you can use the same style sheet for many documents. For example, you could define one style sheet for personal letters, another for official letters, and a third for reports.
Types of CSS
CSS is used to set the style in web pages which contain HTML elements. It sets the background color, font-size, font-family, color, … etc. property of elements in a web pages.
There are three types of CSS which are given below:
- Inline CSS
- Internal or Embedded CSS
- External CSS
Inline CSS: Inline CSS contains the CSS property in the body section attached with element is known as inline CSS. This kind of style is specified within an HTML tag using style attribute.
So, if you take trouble to make your HTML tags specifically used for what they were intended for, how can you make your web page look “cool”?
A style sheet is a file which tells a browser how to render a page. There are even aural style sheets [coming up -1997] for telling a speech browser how to pronounce different tags.
A current recommendation for them is the (CSS) language. Other languages may become accepted in the future. It allows you to specify many more things than you could do in HTML when it comes to color, font, position and generally where and how something is presented.
Why is it useful to keep the style defined in a separate document? here are some reasons:
- Once you have a one, you can use it for many documents;
- When you do that, the browser caches the style sheet, which saves download time;
- You can change the look and feel of all your documents just by changing the style sheet;
- A CSS language is independent of the HTML language: it can grow separately, and it can be used for other document languages (DTDs) apart from HTML in the future;
- Because it keeps your HTML clean, putting the style in a separate sheet helps you with device independence and access for those with disabilities;
- You can have separate them for the printed version of a document.
Have fun with them. Also, within a company or a series of publications, use them to establish conventions which tie a given look to documents of a given status.
« Back to Glossary Index