1. <!DOCTYPE html>
    2. <html>
    3. <head>
    4. <meta charset="utf-8">
    5. <title></title>
    6. <!-- 方式二 -->
    7. <style>
    8. /* p标签选择 */
    9. p{
    10. color: yellow;
    11. font-size: 25px;
    12. font-weight: bold;
    13. }
    14. </style>
    15. <!-- 方式三:外部式 连接式 rel:引入文件和当前文件的关系 -->
    16. <link rel="stylesheet" type="text/css" href="css/CSS_1.css">
    17. <!-- <style>
    18. /* 方式四:导入样式(了解即可) */
    19. @import url("css/CSS_1.css");
    20. </style> -->
    21. </head>
    22. <body>
    23. <!-- 方式一:行内样式 键:值 -->
    24. <p style="color:red">我们不一样</p>
    25. <!-- 方式二:style内嵌式 -->
    26. <!-- <p>我们不一样</p>
    27. <p>我们不一样</p> -->
    28. <!-- <p style="colot:red">我们不一样</p> -->
    29. </body>
    30. </html>
    31. <!-- css中的引入方式的优先级:就近原则 -->
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8">
            <title></title>
        </head>
        <body>
            <p>我们不一样</p>
            <p>我们不一样</p>
            <p>我们不一样</p>
        </body>
    </html>
    
    p{
        /*字体风格*/
        font-family: 宋体;
        /*字体样式  斜体*/
        font-style: italic;
        color: green;
    }
    

    image.png