What is the difference between html syntax and css syntax

青灯夜游
Release: 2023-01-04 09:37:27
Original
2661 people have browsed it

Difference: HTML consists of tags surrounding content, such as "

Content
"; CSS consists of one or more declarations and selectors, each declaration consists of an attribute and It consists of a value, for example "div{font-size:12px;}".

What is the difference between html syntax and css syntax

The operating environment of this article: windows7 system, Dell G3 computer, HTML5&&CSS3.

The difference between html syntax and css syntax

1. HTML consists of tags surrounding content. CSS consists of one or more declarations and selectors.

html syntax example is as follows:

<div>内容</div>
Copy after login

css syntax example:

div{font-size:12px;}
Copy after login

CSS rules consist of two main parts Consists of: a selector, and one or more declarations:

The selector is usually the HTML element you need to change the style of.

Each declaration consists of an attribute and a value.

The property is the style attribute you wish to set. Each attribute has a value. Properties and values ​​are separated by colons.

2. The format of comments is different

<!--HTML注释格式:-->
/*CSS注释内容*/
Copy after login

For more programming-related knowledge, please visit: Programming Video! !

(Recommended tutorials: html tutorial, CSS video tutorial)

The above is the detailed content of What is the difference between html syntax and css syntax. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!