5.样式的引入.html 704 B

12345678910111213141516171819202122232425262728293031
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <!--
  8. link 链接外部样式
  9. rel 关系
  10. stylesheet 样式表
  11. href 路径
  12. -->
  13. <!-- 外部样式表 -->
  14. <link rel="stylesheet" href="./index.css">
  15. <style>
  16. /* 内部样式表 */
  17. /* h1 {
  18. color: blue;
  19. } */
  20. </style>
  21. </head>
  22. <body>
  23. <div>
  24. <!-- 内联样式、行内样式 -->
  25. <h1>aaa</h1>
  26. <!-- <h1 style="color: red;">你好</h1> -->
  27. <!-- <h2>哈哈</h2>
  28. <h3>大家好</h3> -->
  29. </div>
  30. </body>
  31. </html>