External

PHOTO EMBED

Sun Nov 03 2024 12:49:09 GMT+0000 (Coordinated Universal Time)

Saved by @signup1

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>External Style Example</title>
    <!-- Link to the external CSS file -->
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="container">
        <h1 class="heading">Welcome to External CSS Styling</h1>
        <p class="text">This is an example using external styling. All CSS rules are in a separate file.</p>
        <p class="text highlight">This paragraph uses both the `text` and `highlight` classes.</p>
    </div>
</body>
</html>
------
CSS (styles.css):
/* External CSS file: styles.css */

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

.container {
    padding: 40px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    max-width: 800px;
    margin: 20px auto;
}

.heading {
    color: #333;
    text-align: center;
    padding: 20px;
}

.text {
    color: #666;
    font-size: 18px;
    line-height: 1.6;
    margin: 20px;
}

.highlight {
    color: #0056b3;
    font-weight: bold;
}

content_copyCOPY