Type of stylesheet that change the style of an element in the entire website - External Stylesheet

Q.  Using which type of stylesheet we can change the style of an element in the entire website?
- Published on 16 Jun 15

a. Internal Stylesheet
b. External Stylesheet
c. Inline stylesheet
d. None of above

ANSWER: External Stylesheet
 

    Discussion

  • Raj Singh   -Posted on 22 Sep 15
    By using External Stylesheet we can change the style of an element in the entire website. You can change the look and feel of an entire website by changing just one file. You must provide the reference of External Stylesheet in every page in <link> element. The <link> element should be inside the head section:
    <head>
    <link rel="stylesheet" type="text/css" href="DemoStyle.css">
    </head>
    An example of a style sheet file called " DemoStyle.css", is shown below:
    body {
    background-color: lightblue;
    }

    h1 {
    color: red;
    margin-left: 25px;
    }

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)