Types of CSS

There are three types of CSS:

  • Inline CSS: This is the simplest type of CSS, and it is the most commonly used. Inline CSS is written directly in the HTML document.
  • Internal CSS: This type of CSS is stored in a separate file, but it is included in the HTML document using the <style> tag.
  • External CSS: This type of CSS is stored in a separate file, and it is linked to the HTML document using the <link> tag.

Why use CSS?

CSS is a powerful tool that can be used to improve the look and feel of web pages. It can also be used to make web pages more accessible and easier to use.

Here are some of the benefits of using CSS:

  • Increased control over the presentation of web pages. CSS gives you more control over the look and feel of your web pages than HTML alone. You can use CSS to change the font, size, color, and other properties of text on a web page. You can also use CSS to change the background color, border, and other properties of elements on a web page.
  • Improved accessibility. CSS can be used to make web pages more accessible to people with disabilities. For example, you can use CSS to create high-contrast text or to provide audio descriptions of images.
  • Increased flexibility. CSS can be used to create different styles for different media, such as screens, printers, and mobile devices. This allows web pages to be displayed correctly on a variety of devices.

Conclusion

CSS is a powerful tool that can be used to improve the look and feel of web pages. It can also be used to make web pages more accessible and easier to use. If you are serious about web development, then you should learn CSS.

ADVERTISEMENT
ADVERTISEMENT