Sure! Below is a simple implementation following your steps for creating a project in Replit with HTML, CSS, and JS. This project will include a header, an image, a list of links, and styled using CSS.
Step 1: Environment Setup
- Go to Replit and create a new project using the HTML, CSS, JS template.
- Name it
BrandNameLinks
.
Step 2: HTML Code
Create an HTML file (index.html
) and add the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BrandNameLinks</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div align="center">
<h1>My Brand</h1>
<img src="https://via.placeholder.com/150" alt="Brand Logo">
<ul>
<li><a href="https://www.officialwebsite.com">Official Website</a></li>
<li><a href="https://www.facebook.com">Facebook</a></li>
<li><a href="https://www.instagram.com">Instagram</a></li>
<li><a href="https://www.twitter.com">Twitter</a></li>
<li><a href="https://www.youtube.com">YouTube</a></li>
<li><a href="https://www.linkedin.com">LinkedIn</a></li>
</ul>
</div>
</body>
</html>
Step 3: CSS Code
Create a CSS file (style.css
) and add the style below:
/* Body background color */
body {
background-color: #f0f8ff; /* Light blue background */
font-family: Arial, sans-serif; /* Font type */
color: #333; /* Text color */
}
/* Header styles */
h1 {
color: #2c3e50; /* Dark blue color for header */
}
/* Image style */
img {
border-radius: 10px; /* Rounded corners for the image */
}
/* List items styling */
ul {
list-style-type: none; /* Remove default list styling */
padding: 0; /* Remove padding */
}
/* Link styling */
a {
text-decoration: none; /* Remove underline from links */
color: white; /* Text color for buttons */
background-color: #3498db; /* Button color */
padding: 10px 15px; /* Padding around button */
border-radius: 5px; /* Rounded corners for button */
transition: background-color 0.3s; /* Smooth transition */
}
/* Hover effect for links */
a:hover {
background-color: #2980b9; /* Darken button on hover */
}
Comments Explanation
-
HTML:
- The header
<h1>
displays the brand name. - An image placeholder represents the brand's logo.
- A list of links to various social media platforms and the official website is created in an unordered list
<ul>
. - The
<div>
is center-aligned using thealign
attribute.
- The header
-
CSS:
- Body: Sets the background color and font properties for the entire page.
- Header: Changes the text color of the header.
- Image: Applies rounded corners to the image for a more appealing design.
- List Styles: Removes default list styling and extra padding.
- Link: Styles the links to look like buttons with background color, padding, and hover effects for interactivity.
Get Creative!
Feel free to modify this code by changing colors, fonts, and adding more design elements as you see fit. You can also replace the image link with your actual brand's logo and the links with real URLs. Good luck with your project!