Internal, External, Inline CSS

PHOTO EMBED

Sun Nov 03 2024 13:30:43 GMT+0000 (Coordinated Universal Time)

Saved by @signup_returns #html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS Demo</title>
    <link rel="stylesheet" href="styles.css"> <!-- Link to external CSS -->
    <style>
        /* Internal CSS */
        h2 {
            color: green;
            text-align: center;
        }
    </style>
</head>
<body>
    <h1 style="color: blue; text-align: center;">Welcome to CSS Demo</h1> <!-- Inline CSS -->

    <h2>Internal CSS Example</h2>
    <p>This paragraph demonstrates the use of internal CSS for styling headings.</p>

    <h2 style="color: orange;">Inline CSS Example</h2>
    <p>This paragraph is styled using inline CSS for the heading.</p>

    <h2 class="external-header">External CSS Example</h2>
    <p>This paragraph demonstrates the use of external CSS for styling.</p>
</body>
</html>


/* External CSS */
body {
    background-color: #f4f4f4;
    font-family: Arial, sans-serif;
}

.external-header {
    color: purple;
    text-align: center;
}
content_copyCOPY