CSS basic tutor...LOGIN

CSS basic tutorial syntax format

CSS syntax format

19.png

# #The detailed introduction is as follows:


A CSS rule consists of a "selector" and a "format declaration statement".

  • "Selector": It is to select the HTML tag, in other words: it is to add style to which HTML tag.

  • "Format declaration statement": consists of {}, in which are various format statements.

  • #A format statement consists of "attribute name: attribute value".

  • #Each format statement must end with a semicolon ";" in English.

  • Attribute names are various attributes in CSS. These attribute names are fixed.

  • #Attribute value. An attribute name can take on different values. This value is not quoted.

  • The numerical units in CSS are px, and this px cannot be omitted.


Next Section

<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <style type="text/css"> h1{ color:red; border:1px solid black; text-align:center; background-color:#666666; } </style> </head> <body> <h1>欢迎加入php.cn</h1> </body> </html>
submitReset Code
ChapterCourseware