Websites Wiki

Nuvola apps importantWarning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

READ MORE

Websites Wiki
Advertisement


Cascading Style Sheets (CSS) is a front-end declarative programming language. It is most often used to style existing websites created in HTML in a simpler way.[1]

Overview[]

CSS is a style sheet programming language. It is mainly used in HTML documents and other such design languages to style and modify the appearance. Modifying colors, shadows, layout, and order are among the popular choices. The "cascading" part of the name comes from the fact that it is able to affect multiple elements at once in a predictable manner.

It is one of the front end web development languages, along with HTML and JavaScript.

Use[]

CSS can be used to style pages made in HTML and other such coding languages in a simpler way than it would be to use the language already present. It will most often be a sub-type to accompany the main programming language at the time.

Syntax[]

A CSS syntax contains a selector, declaration, and a property, additional sub-selectors, declarations, and experimental W3 properties could be found in a standard stylesheet.

span.class-selector {
  color: white;
}

The syntax above would do the following:

  1. It would select all span elements having a class-selector in the document.
  2. It would look into the bracketed element and check for declarations, if there is none, it would skip to the next declaration if exists. It would then check if the declaration is either recognizable or valid. In this case, the text colour.
    1. It should be noted that the word color should be used rather than the British spelling of colour.
  3. It would check into the properties of that declaration, and check if aforementioned property is valid to be put inside such declaration, if the property is valid, that line of declaration would be parsed for the current document. In this case, a colour of white.
    1. This would repeat from action number 2 if done successfully.

CSS ignores any whitespaces, newlines, spaces and tabs, so CSS stylesheets could be compressed to a more viable transfer state and then unpacked at the destination.

Gallery[]

References[]

Advertisement