Introduction to CSS technology

1, Introduction to css technology

CSS is the abbreviation of Cascading Style Sheet. Translated as "Cascading Style Sheets". Is a markup language for (enhanced) control over web page styles and allows the separation of style information from web content. Using CSS styles you can control many properties that cannot be controlled using HTML alone. HTML is a markup language. When an HTML web page is opened in a browser, the browser will read the HTML tags in the web page and render the web page elements according to the built-in parsing rules. CSS (Cascading Style Sheets) determines how the browser will describe the presentation of HTML elements. In other words, CSS is the rules for describing HTML elements. The latest version of CSS is CSS3. CSS can simplify or optimize the writing method according to the understanding ability of different users, making it more readable for all types of people.

CSS cascading style sheets are a series of formatting rules that control the appearance of web content. When you use CSS to format a page, you can separate content from presentation. The content of the web page (that is, the HTML code) resides in the HTML file itself, while the CSS rules that define the presentation of the code reside in another file (an external style sheet) or another part of the HTML document (usually the file header) . Using CSS allows you to more flexibly control the specific page appearance, from precise layout positioning to specific fonts and styles.

CSS allows control of many properties that HTML cannot control on its own. For example, you can specify different font sizes and units (pixels, point sizes, etc.) for selected text. Font size can be set in pixels via CSS, ensuring a more consistent approach to page layout and appearance across multiple browsers. In addition to formatting text, you can also use CSS to control the formatting and positioning of block-level elements in a web page. For example, you can set margins and borders for block-level elements, floating text around other text, and more.

CSS formatting rules consist of selectors and declarations. The selector is a term that identifies the format element (such as p, h1, class name or id), and the declaration is used to define Element style.

The main advantage of CSS is that it provides convenient update functions. When designing a website, you can create a CSS style sheet file and then connect all web pages in the website to the style sheet file, making it easy to provide a consistent look and style for all web pages within the website. When a style attribute is updated, the formatting of all web pages using that style will be automatically updated to the new style without having to modify it page by page.


##2, CSS properties commonly used in web design

The color of text or elements color

Background color background-color

Background image background-image

Fontfont-family

##Text sizefont-size

##List style list

Mouse style cursor

Border style border

Inner padding

Outside Distance from margin

Continuing Learning
||
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!