CSS Styling

The HTML structure is made to seem better by the CSS file styles.css, which offers a contemporary and eye-catching design.

Code

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Navbar Styling */
.navbar {
    background-color: #333;
    padding: 10px 0;
}
.navbar ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
}
.navbar li {
    margin: 0 15px;
}
.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
.navbar a:hover {
    color: #00bfff;
}

/* Header Styling */
.hero {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(to right, #00bfff, #1e90ff);
    color: white;
}
.hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
}
.hero p {
    font-size: 1.5em;
    margin-bottom: 20px;
}
.hero .btn {
    padding: 10px 20px;
    background-color: white;
    color: #1e90ff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}
.hero .btn:hover {
    background-color: #f0f8ff;
}

/* Main Content Styling */
main {
    padding: 40px 20px;
    text-align: center;
}
main section {
    margin-bottom: 40px;
}
h2 {
    font-size: 2em;
    color: #1e90ff;
    margin-bottom: 15px;
}
ul {
    list-style-type: none;
}
ul li {
    font-size: 1.2em;
    margin: 5px 0;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
}

Reset: This feature resets the box-sizing, margin, and padding to guarantee uniform styling in all browsers.

Navbar: The navigation bar is designed with a black backdrop and hover-activated horizontal links that change color.

Header: Shows a stylized button, text in the center, and a gradient backdrop.

Main Content: Headings and lists are designed to provide a unified visual hierarchy, and sections are padded.

Footer: A dark footer to set off the primary content of the website.

This HTML and CSS combined will result in a contemporary, eye-catching, and responsive homepage design that provides a strong framework for additional customisation.

logo

CSS

CSS Styling

Beginner 5 Hours

The HTML structure is made to seem better by the CSS file styles.css, which offers a contemporary and eye-catching design.

Code

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Navbar Styling */
.navbar {
    background-color: #333;
    padding: 10px 0;
}
.navbar ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
}
.navbar li {
    margin: 0 15px;
}
.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
.navbar a:hover {
    color: #00bfff;
}

/* Header Styling */
.hero {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(to right, #00bfff, #1e90ff);
    color: white;
}
.hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
}
.hero p {
    font-size: 1.5em;
    margin-bottom: 20px;
}
.hero .btn {
    padding: 10px 20px;
    background-color: white;
    color: #1e90ff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}
.hero .btn:hover {
    background-color: #f0f8ff;
}

/* Main Content Styling */
main {
    padding: 40px 20px;
    text-align: center;
}
main section {
    margin-bottom: 40px;
}
h2 {
    font-size: 2em;
    color: #1e90ff;
    margin-bottom: 15px;
}
ul {
    list-style-type: none;
}
ul li {
    font-size: 1.2em;
    margin: 5px 0;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
}

Reset: This feature resets the box-sizing, margin, and padding to guarantee uniform styling in all browsers.

Navbar: The navigation bar is designed with a black backdrop and hover-activated horizontal links that change color.

Header: Shows a stylized button, text in the center, and a gradient backdrop.

Main Content: Headings and lists are designed to provide a unified visual hierarchy, and sections are padded.

Footer: A dark footer to set off the primary content of the website.

This HTML and CSS combined will result in a contemporary, eye-catching, and responsive homepage design that provides a strong framework for additional customisation.

Similar Data Science Tutorials

Related tutotials

Frequently Asked Questions for css

line

Copyrights © 2024 letsupdateskills All rights reserved