Home > Article > Web Front-end > Is css a language?
1: Is css a language?
css is a cascading style sheet, a programming language used to represent html styles. The latest version of css is currently It is CSS3. CSS is a style language that can separate web pages and content. Before CSS entered the front-end language, many people regarded CSS as a front-end language. Today, CSS can not only decorate web pages, but also coordinate Various scripts format web pages. [Recommended reading:What is the difference between html and css]
2: How to use css language
There are three types of css language Methods include external style sheets, internal style sheets, and inline style sheets. Let’s explain them separately below: 1. External style sheetThe external style sheet puts the css code file into the css style sheet, and then The path of the css file is directly referenced in html, and can also be imported. The syntax is as follows:<link type="text/css" rel="styleSheet" href="CSS文件路径" />2. Internal style sheetThe method of using internal style sheet is to directly write css style code in html. Generally, the css style is placed in the style tag, and the style tag must be written into the head. The syntax is as follows:
<head> <style type="text/css"> h3{ color:red; } </style> </head>3. Inline style sheetInline style sheet uses the style tag to directly enter the css style code. Of course, when we write a web page, we do not advocate writing it directly in the web page. . The syntax is as follows:
<h1 style="color:red;">行内样式表</h1>The above is the complete introduction to CSS is a language. If you want to know more about
CSS3 tutorial, please pay attention to the php Chinese website.
The above is the detailed content of Is css a language?. For more information, please follow other related articles on the PHP Chinese website!