what does css stand for

Melissa
2 min readDec 12, 2023

--

Photo by Balázs Kétyi on Unsplash

Now that we have seen in our previous article, “What does HTML stand for?. In order to learn HTML, we need to know… | by Melissa | December 2023 | Medium, Now it is time to learn more about CSS. To begin, have you ever wondered what CSS means?

It is an abbreviation of Cascading Style Sheets. It is used to style a webpage by specifying how every HTML element appears on the screen. It can control the layout, the designs, and the effects that are shown on different webpages. We can link it to the HTML code by using an external CSS file or simply use it inside the webpage and only use the style tag.

What do we mean by Cascading Style Sheet?

This is what ChatGPT says:

Cascading style sheet means a style sheet that applies different rules to HTML elements based on their order, specificity, and inheritance.The term “cascading” implies that the final appearance of an element is determined by combining multiple style rules from different sources, such as external, internal, or inline styles. For example, if you have an <h1> element with a class of “title” and an id of "main," you can use CSS to style it differently depending on the selector you use:

  • h1 { color: blue; } will make all <h1> elements blue.
  • .title { font-size: 36px; } will make all elements with the class “title” have a font size of 36 pixels, including the <h1> element.
  • #main { font-weight: bold; } will make the element with the id “main” have a bold font weight, regardless of its tag name or class.
  • h1.title { text-align: center; } will make only the <h1> element with the class “title” have a centered text alignment.
  • h1#main { color: red; } will make only the <h1> element with the id “main” have a red color, overriding the previous rule for <h1> elements.

As you can see, the more specific the selector, the higher the priority of the style rule. This is how CSS cascades from general to specific and from top to bottom.

Melissa Sidisaid

--

--