Okay, let's build a simple CV website. I'll provide you with the HTML, CSS, and a bit of optional JavaScript to get you started. This will be a single-page CV website. You'll need to save these as separate files (e.g., index.html, style.css, script.js) and then open index.html in your browser.
1. index.html (The Structure)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Name - CV</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Your Name</h1>
<p>Your Job Title / Headline (e.g., Software Engineer, Marketing Specialist)</p>
<nav>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#experience">Experience</a></li>
<li><a href="#education">Education</a></li>
<li><a href="#skills">Skills</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section id="about">
<h2>About Me</h2>
<p>Write a brief summary about yourself. Highlight your key skills and career goals. This section is very important for recruiters so it should be really well written.</p>
</section>
<section id="experience">
<h2>Experience</h2>
<div class="experience-item">
<h3>Job Title</h3>
<p class="company">Company Name | City, State | Dates of Employment</p>
<ul>
<li>Responsibility 1: Describe your accomplishment. Use action verbs.</li>
<li>Responsibility 2: Describe your accomplishment. Use action verbs.</li>
<li>Responsibility 3: Describe your accomplishment. Use action verbs.</li>
</ul>
</div>
<!-- Add more experience items as needed -->
</section>
<section id="education">
<h2>Education</h2>
<div class="education-item">
<h3>Degree Name</h3>
<p class="institution">University Name | City, State | Dates Attended</p>
<p>Relevant coursework or achievements.</p>
</div>
<!-- Add more education items as needed -->
</section>
<section id="skills">
<h2>Skills</h2>
<ul>
<li>Skill 1</li>
<li>Skill 2</li>
<li>Skill 3</li>
<li>Skill 4</li>
<li>Skill 5</li>
<!-- Add more skills as needed -->
</ul>
</section>
<section id="projects">
<h2>Projects</h2>
<div class="project-item">
<h3>Project Title</h3>
<p>Brief description of the project.</p>
<a href="#">Link to Project (if applicable)</a>
</div>
<!-- Add more project items as needed -->
</section>
<section id="contact">
<h2>Contact</h2>
<p>Email: your.email@example.com</p>
<p>LinkedIn: <a href="#">Your LinkedIn Profile</a></p>
<p>GitHub: <a href="#">Your GitHub Profile</a></p>
</section>
</main>
<footer>
<p>© 2023 Your Name</p>
</footer>
<script src="script.js"></script>
</body>
</html>
2. style.css (The Styling)
/* Basic Reset */
body, h1, h2, h3, p, ul, li {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
body {
font-family: sans-serif;
line-height: 1.6;
background-color: #f4f4f4;
color: #333;
}
/* Header */
header {
background-color: #333;
color: #fff;
padding: 1rem 0;
text-align: center;
}
header h1 {
margin-bottom: 0.5rem;
}
nav ul {
list-style: none;
display: flex;
justify-content: center;
}
nav li {
margin: 0 1rem;
}
nav a {
color: #fff;
text-decoration: none;
}
/* Main Content */
main {
padding: 2rem;
}
section {
margin-bottom: 2rem;
background-color: #fff;
padding: 1.5rem;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
section h2 {
margin-bottom: 1rem;
border-bottom: 2px solid #ccc;
padding-bottom: 0.5rem;
}
/* Experience & Education */
.experience-item, .education-item {
margin-bottom: 1.5rem;
}
.company, .institution {
font-style: italic;
color: #777;
}
.experience-item ul {
list-style: disc;
margin-left: 2rem;
}
/* Skills */
#skills ul {
list-style: none;
display: flex;
flex-wrap: wrap;
}
#skills li {
background-color: #eee;
padding: 0.5rem 1rem;
margin: 0.5rem;
border-radius: 3px;
}
/* Projects */
.project-item {
margin-bottom: 1rem;
}
/* Contact */
#contact p {
margin-bottom: 0.5rem;
}
#contact a {
color: #007bff;
text-decoration: none;
}
#contact a:hover {
text-decoration: underline;
}
/* Footer */
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 1rem 0;
}
/* Media Queries for Responsiveness */
@media (max-width: 768px) {
nav ul {
flex-direction: column;
align-items: center;
}
nav li {
margin: 0.5rem 0;
}
#skills ul {
flex-direction: column;
}
}
3. script.js (Optional - for basic scrolling)
// Optional: Smooth scrolling to sections
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
How to Use:
- Create Files: Create three files:
index.html, style.css, and script.js.
- Copy Code: Copy the code for each section above into the corresponding file.
- Edit Content: Crucially, replace the placeholder text in
index.html with your own information (name, job title, about me section, experience, education, skills, projects, contact details).
- Open in Browser: Open the
index.html file in your web browser.
Explanation:
- HTML (index.html):
- Sets up the basic structure of the webpage with sections for: About, Experience, Education, Skills, Projects and Contact.
- Uses semantic HTML5 tags like
<header>, <nav>, <main>, <section>, and <footer> for better structure and accessibility.
- Includes links in the navigation to jump to different sections.
- CSS (style.css):
- Provides basic styling for the page, including fonts, colors, layout, and responsiveness using media queries. It's designed to be clean and readable.
- Uses a basic CSS reset to normalize styles across different browsers.
- JavaScript (script.js):
- This is optional. It adds smooth scrolling when you click on the navigation links. If you don't need smooth scrolling, you can omit this file and the
<script> tag in index.html.
Customization:
- Colors and Fonts: Modify the CSS to change the colors and fonts to match your personal brand.
- Layout: Experiment with the CSS to adjust the layout of the different sections.
- More Sections: Add more sections as needed (e.g., Awards, Publications, Portfolio).
- JavaScript Enhancements: Add more JavaScript for interactive elements (e.g., a contact form).
- Images: Add a profile picture within the header. You'll need to add an
<img> tag in the HTML and adjust the CSS accordingly. For example:
<header>
<img src="your-photo.jpg" alt="Your Photo" class="profile-pic">
<h1>Your Name</h1>
<p>Your Job Title / Headline</p>
</header>
.profile-pic {
width: 150px; /* Adjust as needed */
height: 150px; /* Adjust as needed */
border-radius: 50%; /* Makes it circular */
object-fit: cover; /* Prevents distortion */
margin-bottom: 1rem;
}
- Hosting: To make your website publicly accessible, you'll need to host it on a web server. Popular options include Netlify, GitHub Pages, Vercel, or traditional web hosting providers.
Important Considerations:
- Content is King: The most important part of your CV website is the content. Make sure it is accurate, up-to-date, and well-written. Tailor it to the types of jobs you are seeking.
- Mobile Responsiveness: The provided CSS includes basic responsiveness, but test it on different devices to ensure it looks good on phones and tablets.
- Accessibility: Consider accessibility best practices when designing your website. Use semantic HTML, provide alt text for images, and ensure sufficient color contrast.
- SEO: If you want your website to be easily found in search engines, optimize it for SEO (search engine optimization). Use relevant keywords, write clear and concise content, and build backlinks.
This should give you a solid starting point for your CV website. Remember to customize it to make it your own! Good luck!