Home > Article > Web Front-end > Three levels introduced by css style
1. Attribute introduction: Add the style attribute in the tag, only applicable to the current tag
2.c9ccee2e6ea535a969eb3f532ad9fe89 tag introduction: Use the c9ccee2e6ea535a969eb3f532ad9fe89 tag in the current page to introduce, only applicable to Current document
3.2cdf5bf648cf2f33323966d7f58a7f3f tag introduction: refers to an external CSS style sheet file, applicable to all documents that introduce the file
The three methods have their own purposes, use them according to your needs ,However, unless there are special circumstances, use external style sheets as much as possible
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="./css/demo.css"> <link rel="stylesheet" type="text/css" href="./css/demo.php"> <title>css样式引入的三个级别</title> <style type="text/css"> h3 { background-color: lightcyan; color: blue; } </style> </head> <body> <h3 style="color: green">这是一个悲伤的故事</h3> </body> </html>
The above is the detailed content of Three levels introduced by css style. For more information, please follow other related articles on the PHP Chinese website!