Content"; CSS consists of one or more declarations and selectors, each declaration consists of an attribute and a value, such as "div{ font-size:12px;}"."/> Content"; CSS consists of one or more declarations and selectors, each declaration consists of an attribute and a value, such as "div{ font-size:12px;}".">
Home > Article > Web Front-end > What is the difference between html syntax and css syntax
Difference: HTML consists of tags surrounding content, such as "dc6dce4a544fdca2df29d5ac0ea9906bContent16b28748ea4df4d9c2150843fecfba68"; 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;}".
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>
css syntax example:
div{font-size:12px;}
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注释内容*/
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!