what is css file introduction and why it is used in html



The full name of CSS is cascading style sheet. HTML and CSS have a huge hand behind the technique of creating a webpage. The use of HTML gives the webpage a shape and the use of CSS gives the webpage a new and attractive look. HTML and CSS are always used together. Without CSS we can use HTML but CSS cannot be used without HTML.

Using CSS, we can show the text of the webpage in good color, control the space between the styles and paragraphs of fonts, the images of the background, and the use of what color in the background will give a good look to the webpage. CSS is used to set things. The CSS HTML document gives a completely new look, which attracts more users.


  • CSS saves time - we have lots of other styles used in an HTML webpage you can use it in a web page also by writing the code of CSS only once. We will not have to write css code repeatedly to create a different web page. And by using CSS code written only once, we can create as many web pages as we want, in which we have a lot of time left.

  •  It helps the page to load quickly - If we use css, we do not need to write the attributes of the Html tag again and again. Just once according to the rule of css, by writing the attributes of the tag and applying it in the web page, that tag will appear correctly everywhere. Therefore, the tag will not have to write the same code again and again to appear in different places on the web page, and if there is less code, then the web page will load quickly in the browser.

  •  Easy to Maintain - To change the style of the web page completely, just changing the code of style of css once will automatically change all the elements used in Html at once and change all the elements one by one. It Will is not necessary.

  • The platform is independent - platform-independent means that we can use CSS in any platform like Windows, Linux, Macintosh etc. And it also supports all the latest browsers.

  • Provide Responsive Design - You cannot optimize web pages from HTML for each device. However, with the Media Queries Rules of CSS, you can make web pages responsive according to every device and screen size.

  • The responsive site layout is one of Google's top-ranking factors. Therefore, webmasters also like this quality very well.

  • You optimize your desktop site for smartphones, tablets, and other devices with just one code. And the mobile version is free from the mess of the desktop version.