What is CSS |Day 10 | Inline, Internal and External CSS in CSS | CSS tutorial for Beginner 2023

11 months ago
9

CSS, or Cascading Style Sheets, is a language that describes the presentation of a web document. It is used to style the content of an HTML document, changing the appearance of elements such as text, images, and buttons.

There are three main ways to use CSS:

Inline CSS:

Inline CSS is added directly to an HTML element using the style attribute.
This is the least preferred way to use CSS, as it makes your HTML code difficult to read and maintain.
Use inline CSS only for quick and specific styling.
Internal CSS:

Internal CSS is added to the <head> section of an HTML document using the <style> tag.
This is a more efficient way to use CSS than inline styles, as it allows you to style multiple elements at once.
External CSS:

External CSS is added to a separate file with a .css extension.
This is the most preferred way to use CSS, as it keeps your HTML code clean and organized.
You can then link to the CSS file from your HTML document using the <link> tag.

Loading comments...