Css, Selectors, Ways To Insert

MEANING:

CSS stands for Cascading Style Sheets; CSS is a language that describes the style of an HTML document. CSS describes how HTML elements should be displayed. CSS describes how HTML elements are to be displayed on screen, paper, or in other media.CSS saves a lot of work. It can control the layout of multiple web pages all at once. External style sheets are stored in CSS files.

CSS Selectors

CSS selectors are used to "find" (or select) the HTML elements you want to style. We can divide CSS selectors into five categories:

  • Simple selectors (select elements based on name, id, class)

  • Combinator selectors (select elements based on a specific relationship between them)

  • Pseudo-class selectors (select elements based on a certain state)

  • Pseudo-elements selectors (select and style a part of an element)

  • Attribute selectors (select elements based on an attribute or attribute value)

    Three Ways to Insert CSS

    There are three ways of inserting a style sheet:

  • External CSS

  • Internal CSS

  • Inline CSS

    CSS background properties:

  • background-color

  • background-image

  • background-repeat

  • background-attachment

  • background-position