+ 1

Why we use CSS code in HTML?

.

8th May 2017, 4:34 PM
Amaan Jaff
Amaan Jaff - avatar
3 Answers
+ 4
To be able to store all the styles outside documents - both static and dynamically generated - and to pass them on to different webpages.
8th May 2017, 4:47 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 4
As possiblilies of styling Html were grown, it becomes usefull to standardize a specific syntax for styles, rather than more and more attributes of Html elements, wich had bad side to make source code heavy and from less to less readable, in addition to complexify the Html specifications. During same time, the concept of MVC ( model view controller ) impose itself with the idea of separation between data and style applied to Html, W3c decide to initiate the specifications of Css and progressivly deprecate style attributes and features directly linked in Html specifications, with benefit to be able to separate "physically" in different files data ( html: model ) and style ( css: view ). ( Js can be considered as controller in the MVC model, and can be file separated also ^^ )
8th May 2017, 5:50 PM
visph
visph - avatar
0
Web style and contents are separated, enable us to change layout designs easily, without changing any html contents.
8th May 2017, 4:54 PM
CalviŐČ
CalviŐČ - avatar