What Commands Are There In CSS

Table of contents:

What Commands Are There In CSS
What Commands Are There In CSS

Video: What Commands Are There In CSS

Video: What Commands Are There In CSS
Video: CS Source console commands for better gameplay 2024, April
Anonim

Cascading style sheets are used to format the content of an HTML page. Accordingly, all the commands used in CSS are aimed at editing the appearance of any elements of an HTML document.

What commands are there in CSS
What commands are there in CSS

It is necessary

A computer with an internet connection

Instructions

Step 1

Read about how cascading style sheets are used. Text formatting is the most commonly used feature of cascading style sheets. Any HTML document contains a huge amount of textual information in its various parts. At the same time, each part of the page should have its own format and font: part of the text is the text of the menu, the other is the title, the third is the main text of the page, etc. To format text information, commands are used to change the name of the font, its size, weight, etc.

Step 2

So, first of all, notice the font-family style parameter. This attribute allows you to set a specific font for this tag. The name of the font is written after the ":" sign. The font-size style attribute is used to set the size of the text contained in the tag. The size value is also written after the ":" sign and is indicated in pixels, for example, "font-size: 20px".

Step 3

Note that style parameters can be combined and written together using the ";" sign. This is useful if you need to set several parameters for one tag.

Step 4

Use the color style attribute to change the color of the text. The color name is written in the standard way: green, blue, red, etc. It also has the ability to set the color of not only the text itself, but also the background color. For this purpose, the background-color attribute is used, after which the selected color must also be indicated. If you want to use an image, not a fill, as a background in the area of this tag, then refer to the background-image style parameter, specifying after it the source of the image.

Step 5

Get acquainted with a number of style attributes that set the parameters of page elements, which, first of all, include padding, border, float, position.

Step 6

Use the padding parameter to set the amount of the margin that is bound to the given tag. In this case, this value is counted from each side. Specify the border attribute to form the border of this field. After the colon, the width of the border is written in pixels. The float property will allow an element on your page to float to the right or left. In this regard, the qualifying parameters of this property are left or right.

Step 7

If you need to precisely position an object on the document, use the position property. It locates the page element in an absolute way, such as "position: absolute; bottom: 50px; right: 10px;", or in a relative way, based on the distance from the edges of the page.

Recommended: