Interview Questions

Why do style sheets exist?

CSS Interview Questions and Questions


(Continued from previous question...)

18. Why do style sheets exist?

SGML (of which HTML is a derivative) was meant to be a device-independent method for conveying a document's structural and semantic content (its meaning.) It was never meant to convey physical formatting information. HTML has crossed this line and now contains many elements and attributes which specify visual style and formatting information. One of the main reasons for style sheets is to stop the creation of new HTML physical formatting constructs and once again separate style information from document content.

(Continued on next question...)

Other Interview Questions