Difference between HTML and CSS
What is HTML and CSS ?
HTML stands for Hyper Text Markup Language.
In 1989 Tim Berners Lee invented the Web with HTML as its publishing language. It was created for programmers so that they can publish new information on the web. HTML uses different tags to help us add paragraphs, headings, images, lists and other pieces of information. Just like we would write something in a word document, HTML helps us write on the web.
CSS describes how HTML elements are to be displayed on screen, paper, or in other media.
CSS is an acronym for Cascading Style Sheet. CSS was first proposed by Hakom Lie and co-created by Bert Bos around 1996. It was created to complement HTML, It makes a simple HTML site look really amazing. CSS has brought qualities like ease and presentation to the web. CSS is responsible for changing the fonts, font-size, background etc. In a way CSS is in charge of the way a website looks.
|Basis for comparison||HTML||CSS|
|Definition||Dictates content and structure of the web pages.||Modifies the design and display of the HTML elements.|
|Usage||CSS can be used in HTML files.||HTML cannot be used in CSS style sheets.|
|Syntax||Tags surrounding content.||Selectors succeeded by a declaration block.|
|Methods of using||There are no defined methods.||Inline CSS code, Internal and external stylesheet any method could be used for implementing the code.|
Key Differences Between HTML and CSS
- HTML is a basic markup language which defines the content and structure of the web pages. On the other hand, CSS is an extension of the HTML which modifies the design and appearance of web pages.
- HTML file can contain CSS code while CSS stylesheets can never contain HTML code in it.
- HTML comprises of tags surrounding content. Whereas CSS comprised of selectors following a declaration block.
Both of the languages are used for manipulating the front-end. HTML defines the structure of a web-page while CSS manipulates that structure and make it’s appearance good. Both of them are an integral part of web-development in today’s world. Although one can create web-pages without CSS but not without HTML.