forum_image

Discussion Forum

Interative Forum for discussing any query literally to UGC-NET Computer Science, GATE Computer Science and Computer Sciene and Technology in general.

ugc_net image

UGC-NET Computer Science

Correspondence Courses and Test Series to prepare for UGC-NET computer science and applications

GATE image

GATE

MCQs, Lecture Notes, Ebooks for GATE preparation

freestuff image
jobs image

Jobs Newsfeed

Timely information of various Recruitments.

NextPrev

Introduction to Stylesheets

An External Style Sheet is a template or file that consists only of CSS rules and comments but does not contain any markups. An external style sheet can be written in any text editor. The file should not contain any html tags. Your style sheet should be saved with a .css extension. These files are stored separately from the web pages of the website to which they are applied.

An external style sheet is ideal when the style is applied to many pages. With an external style sheet, we can change the look of an entire Web site by changing one file. In order to apply these rules, you need to just link this file to each web page on the website to which rules need to be applied. Each page must link to the style sheet using the tag. The tag goes inside the head section:
link rel="stylesheet" type="text/css" href="mystyle.css"

Style sheets for multiple pages H1 { text-align : center; font-style : italic } P { color : #ff0000} ------- Save above file let we name as abc.css
----- link rel = stylesheet type = “text/css” href = “abc.css”

Advantages of External Style Sheet There are many advantages for using external CSS and some of are:

  1. Full Control of page structure: CSS allows us to display our web page according to W3C HTML standards without making any compromise with the actual look of the page.
  2. Reduced file-size: By including the styling of the text in a separate file, we can dramatically decrease the file-size of your pages.
  3. Less load time: Today, when Google has included the Loading time in his algorithm, its become more important to look into the page loading time and another benefit of having low file-size pages translates into reduced bandwidth costs.
  4. Higher page ranking : CSS will help us to create highly readable pages, rich in content. As you very well know, better site ranking means better visibility on the web, and this can translate into more visitors and, ultimately, into increased sales or number of contracts.
  5. It can be used to apply style on multiple WebPages in a website at once.
  6. It is easy to maintain website, as changes made in external style sheet will automatically be reflected to all the WebPages within website.
  7. You can reuse the same webpage with different style sheets according to the needs of different visitors.
  8. You can easily use the style sheets created by others without having the knowledge of individual style settings.
Disadvantages of External Style Sheet
  1. Additional download time required to download external style sheet file. But once it is downloaded with the first webpage, the subsequent WebPages require less time to download, as it is being cached.
  2. The formatting of webpage will be delayed until the external style sheet is downloaded.
  3. It is not useful when number of elements to which style is applied is very less




Return To HTML Topics