What Is Css

Table of contents:

What Is Css
What Is Css

Video: What Is Css

Video: What Is Css
Video: What is CSS? And How It Works! 2024, December
Anonim

CSS - cascading style sheets that are used to create visual elements on a website page. The rendering of objects specified in CSS is implemented in the HTML markup language. Cascading tables themselves cannot be used alone.

What is css
What is css

Using CSS

CSS is a style language that implements the rendering of HTML markup elements. Cascading tables allow you to customize options that cannot be changed in HTML. For example, using the style language, you can edit the font style, color. CSS allows you to set margins, lines, padding, width, position elements and perform the output of those parameters that are impossible to implement with "pure" HTML.

Cascading style sheets are supported by almost all browsers and are used on almost any web resource. They control the display of content using a specified language and allow you to control the display of items for different media.

If HTML is used only as a means of structuring the text on a page, CSS allows you to customize the display of the displayed content.

CSS syntax and its inclusion in HTML code

When designing a page, CSS is preferred over HTML tools. The fact is that HTML initially did not have means for editing the color of elements and was not intended to set color and display parameters, and therefore the use of HTML descriptors for creating a design may be considered incorrect by some web developers.

CSS has a different syntax than HTML and is included in the page code through tags. You can also integrate the CSS code that is in a separate file using the parameters tag:

CSS-code has a certain syntax, which should be strictly adhered to, otherwise the generated styles will not be displayed on the page. A section of CSS code can be divided into 3 main elements: selector, property and value. These items are written as follows:

selector {property: value; }

The selector specifies the handle to which the generated display rule applies. The property parameter defines the editable aspect of the element, and the value defines the corresponding option for the property. For example, to change the color in the second level heading

HTML, you can apply the following code:

h2 {color: red; }

This code sets the text color to red, which is located in the second-level heading descriptor.

CSS uses the standard HTML color table.

In addition to using tags, you can also use internal tags. For example:

Heading

This code is identical to the one described above with the difference that the CSS parameters themselves were set inside the descriptor needed for editing.