Home > Web Front-end > CSS Tutorial > Is css a language?

Is css a language?

云罗郡主
Release: 2018-11-20 17:12:47
Original
9066 people have browsed it





##Many people have just come into contact with css When you were doing this, you didn’t know what language CSS belongs to? In fact, it is normal not to know the CSS language. Let’s talk about whether CSS is a language? And how to use css 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:

Is css a language?

1. External style sheet

The 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文件路径" />
Copy after login

2. Internal style sheet

The 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>
Copy after login

3. Inline style sheet

Inline 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>
Copy after login

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!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template