CSS syntax specification

1.CSS language norms and regulations

When using HTML, we need to comply with certain syntax specification, CSS, too, if you want a skilled web pages modified, close to Xi'an i need to know about CSS style rules.

CSS rules:

CSS of two main parts: a selector and one or more statements:

    h1 {color:red; front-size=26px}

Wherein h1 is the selector, color is an attribute, red is a value, font-size attribute is, 25pxs is the value. Who is equivalent to modify the style, modify why the kind of style. Must be a pair of attributes and values ​​between the colon ":", the attribute must be between a semicolon ";" separated flowers properties are located within the brackets.

1. CSS style selector is used to specify the HTML tags, the braces are subject to the specific style setting.

2. attributes and properties with the property values ​​appear to "key on" Color form of (key): red (value);

3. The property is a property of the specified object to the style set, such as font size, text color, etc.

4. attribute with the attribute value between the colon ":" separated

The plurality of "key-value pairs" between English ";" distinguish

 <head>
<style>
      p{font-size:35px;color:blueviolet}
  </style>
</head>
....
<body>
<p>新年好呀!</p>
</body>

When writing CSS, you must be written in the <head> </ head> inside.

To write on the inside and a <style> </ style> , which are written on the selector.

1579794900104

Guess you like

Origin www.cnblogs.com/GZ1215-228513-Chichy/p/12232103.html