1.

Which of the following is the correct way to applying style to a document?(a) Use an external style sheet, either by importing it or by linking to it(b) Directly embed a document-wide style in the head element of the document(c) Set an inline style rule using the style attribute directly on an element(d) All of the mentionedThe question was posed to me in exam.The doubt is from The Specification of CSS in chapter CSS Fundamentals, Colors and Styling of CSS

Answer»

The correct option is (d) All of the mentioned

For explanation: We can style the document using CSS in three different ways i.e embed, inline and external. In any way as mentioned, we can apply CSS.An inline CSS means APPLYING styles RULES directly to the element. In embed, we DECLARE or write all the needed style in tag in the head element of the document. Expect these TWO ways we can also use another way in which we can create an external style sheet and provide its link to the document.



Discussion

No Comment Found

Related InterviewSolutions