Program 5

Develop HTML page named as "newspaper.html" having variety of HTML semantic elements with background colors, text-colors and size for figure, table, aside, section, article,header, footer.

CODE

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>The Deccan Chronicle</title>
    <style>
        body {
            font-family: Georgia, serif;
            line-height: 1.6;
            color: #333;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f4f4f4;
        }

        header {
            background-color: #1a1a1a;
            color: #fff;
            padding: 20px;
            text-align: center;
        }

        header h1 {
            margin: 0;
            font-size: 2.5em;
        }

        nav {
            background-color: #333;
            color: #fff;
            padding: 20px;
        }

        nav ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
            display: flex;
            justify-content: center;
        }

        nav ul li {
            margin: 0 10px;
        }

        nav ul li a {
            color: #fff;
            text-decoration: none;
        }

        main {
            display: flex;
            margin-top: 20px;
        }

        section {
            flex: 2;
            margin-right: 20px;
        }

        article {
            background-color: #fff;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        figure {
            margin: 0;
            text-align: center;
        }

        figure img {
            max-width: 100%;
            height: auto;
        }

        figcaption {
            font-style: italic;
            color: #666;
            font-size: 0.9em;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }

        th,
        td {
            border: 1px solid black;
            padding: 10px;
            text-align: left;
        }

        th {
            background-color: #f2f2f2;
        }

        footer {
            background-color: #1a1a1a;
            color: #fff;
            text-align: center;
            padding: 10px;
            margin-top: 20px;
        }
    </style>
</head>

<body>
    <header>
        <h1>The Daily chronicle</h1>
    </header>
    <nav>
        <ul>
            <li><a href="#">Home</a></li>
            <li><a href="#">Politics</a></li>
            <li><a href="#">Technology</a></li>
            <li><a href="#">Sports</a></li>
            <li><a href="#">Entertainment</a></li>
        </ul>
    </nav>
    <main>
        <section>
            <article>
                <h2>Breaking News : Major technological breakthrough.</h2>
                <p>scientists hae announced a groundbreaking theory in the field of Quantum Computing , potentially
                    revolutionizing the tech industry. </p>
                <figure>
                    <img src="quantumcomputer.jpg" alt="Quantum Computer">
                    <figcaption>A state-of-art quantum computer at the research facility.</figcaption>
                </figure>
            </article>
            <article>
                <h2>Local Sports Team Wins Championship</h2>
                <p>In a thrilling match, our local team secured victory in the national Championship, bringing pride to
                    our city</p>
                <table>
                    <tr>
                        <th>Team</th>
                        <th>Score</th>
                    </tr>
                    <tr>
                        <td>Local Heroes</td>
                        <td>3</td>
                    </tr>
                    <tr>
                        <td>Visiting Challengers</td>
                        <td>2</td>
                    </tr>
                </table>
            </article>
        </section>
        <aside>
            <h3>Weather Update</h3>
            <p>Expect sunny skies with a high of 75°F(24°C)today.</p>
            <h3>Upcoming Events</h3>
            <ul>
                <li>City Festival - This Weekend</li>
                <li>Teh Conference - Next Month</li>
                <li>Charity Run - In Two Weeks</li>
            </ul>
        </aside>
    </main>
    <footer>
        <p>© 2023 The Deccan Chronicle. All Rights Reserved.</p>
    </footer>
</body>

</html>

    

Output

Program5Output
Copied to Clipboard!