HTML vs CSS
HyperText Markup Language, widely known as HTML is the leading markup language for web pages. HTML is the basic building block of web pages. Web browser reads the HTML document and composes them into visual or audible web pages. Cascading Style Sheets (CSS) is a language that describes the look and formatting of a document written using a mark up language. CSS is widely used to style web pages written in HTML.
What is HTML?
What is CSS?
As mentioned earlier, CSS defines how HTML elements need to be displayed in a page. Originally, HTML was not intended to have tags for formatting a document, but to define the content. But, the introduction of tags like <font> in HTML 3.2 made the lives of web developers very difficult. When developing large web sites, adding font and color information to every page became a very tedious process. As a solution to this problem, World Wide Web Consortium (W3C) created CSS. HTML 4.0 allows all formatting to be removed from the HTML document and to be stored in a separate CSS file. CSS enables separation of document content from document presentation such as layout, colors and fonts. This would allow multiple web pages to share the same formatting and reduce complexity and repetition in structural content. CSS can also allow the same markup page to be presented in different styles by allowing the readers to choose a different style sheet to override the one specified by the author of the web page. Today CSS is widely used and supported by all the browsers.
Difference Between HTML and CSS
The main difference between HTML and CSS is that HTML is a markup language that is used to specify the content of a web page, while CSS is a style sheet language that is used to specify the formatting of web page. Even though HTML can also specify formatting of a web page, using CSS for this purpose would be more effective, since it would allow separation of content from presentation and Site-wide consistency.