
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
Difference Between HTML and CSS
In this post, we will understand the difference between HTML and CSS
HTML
It refers to Hyper Text Markup Language.
It helps create web pages and applications.
It helps define structure of web page.
It is a markup language.
It helps create static pages as well.
It helps display data.
HyperText helps define link between multiple web pages.
Markup Language helps define text document using tags, which gives a structure to the web page.
It has less backup and support options.
HTML can’t be used inside a CSS sheet.
It helps annotate the text so that a system can understand it and use it.
There are specific number of tags in HTML.
These tags are predefined.
Data is enclosed within tags.
Closing tags are not a necessity.
An example of HTML −
Example
<!DOCTYPE html> <html> <head> <title>My title</title> </head> <body> <h1>title</h1> <p>A sample</p> </body> </html>
Output
CSS
It helps style the web pages.
It uses different styling features to achieve the same.
It uses ‘selectors’ and ‘declaration blocks’.
It can be an external file or an internal file, depending on the requirement in hand.
CSS can be used inside a HTML document.
It can be used to display data.
It has a higher backup and support in comparison to HTML.
An example of CSS −
Example
<style> p { color: pink; text-align: left; } </style>
- Related Articles
- Difference between HTML and HTML 5
- Difference between CSS and JavaScript
- Difference Between XML and HTML
- Difference Between HTML and ASP.
- Difference between JavaScript and HTML
- Difference Between RTF and HTML
- Difference between WML and HTML
- Difference between HTML and XHTML
- Difference between "." and "#" selector in CSS
- Difference Between CSS Display and Visibility
- Difference between CSS Grid and Bootstrap
- Difference between resetting and normalizing CSS?
- Difference between XHTML and HTML 5
- Difference between specification and recommendation that introduced CSS
- Difference between CSS border-collapse:collapse; and border-collapse:separate;
