Three commonly used writing methods are: 1. Inline style, syntax "
"; 2. Internal style, syntax "Element name {attribute: attribute value;}"; 3. External style, syntax "".
CSS
1.How to use CSS (inline style, internal style, external style)--inline style
Syntax:
2.CSS How to use - internal style
<head> <style> p{ width:100px; } </style> </head>
3. How to use CSS - external style
Define the style in external files with the .css suffix, and then reference these files on the page
Extended information:
Hyperlink
<a>内容</a>
Note: Only after the href attribute is set, the hyperlink is allowed to be clicked
Attribute:
href=""
General usage:
href="Complete URL"
Special usage:
href="#" Return to top
href="Path to compressed package file" Download this file
href="javascript:js code" Execute this js code
Anchor point
Mark the place you want to jump to
Jump
The above is the detailed content of What are the three common ways to write css?. For more information, please follow other related articles on the PHP Chinese website!