Resume Builder with HTML, CSS & JavaScript

40 DAYS 40 PROJECT CHALLENGE

Day #08

Project Overview

A Resume Builder application created using HTML, CSS, and JavaScript with a modern and responsive layout. This tool enables users to enter their personal information, education background, skills, and work experience to automatically generate a well-structured resume. The project highlights frontend concepts such as interactive forms, real-time data display, DOM updates, and responsive UI design, helping beginners understand how dynamic web applications work.

Key Features

  • Form-based input for personal information, skills, education, and experience
  • Instant resume generation from user-provided details
  • Simple and professional resume template layout
  • Ability to modify or update entered information easily
  • Responsive interface that adapts to different screen sizes
  • Clean and intuitive user experience
  • Dynamic content updates using JavaScript
  • Option to print or export the generated resume easily

HTML Code

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Premium Resume Builder</title>
<link rel="stylesheet" href="style.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>
</head>

<body>

<div class="container">

<h2>Resume Builder</h2>

<label>Template</label>
<select id="templateSelect">
<option value="harvard">Harvard</option>
<option value="corporate">Corporate</option>
<option value="modern">Modern</option>
</select>

<input id="name" placeholder="Full Name">
<input id="title" placeholder="Professional Title">
<input id="email" placeholder="Email">
<input id="phone" placeholder="Phone">

<textarea id="summary" placeholder="Professional Summary"></textarea>

<h3>Education</h3>
<div id="educationList"></div>
<button id="addEducation">Add Education</button>

<h3>Experience</h3>
<div id="experienceList"></div>
<button id="addExperience">Add Experience</button>

<input id="skills" placeholder="Skills (comma separated)">

<button id="generateBtn">Generate Resume</button>
<button id="downloadBtn">Download PDF</button>

</div>


<!-- Resume Preview -->

<div class="preview template-harvard" id="resumePreview">

<div class="sidebar">

<h1 id="pName">Your Name</h1>
<h3 id="pTitle"></h3>
<p id="pContact"></p>

<h2>Skills</h2>
<ul id="pSkills"></ul>

</div>


<div class="main" id="dragArea">

<div class="section" draggable="true">
<h2>Professional Summary</h2>
<p id="pSummary"></p>
</div>

<div class="section" draggable="true">
<h2>Experience</h2>
<div id="pExperience"></div>
</div>

<div class="section" draggable="true">
<h2>Education</h2>
<div id="pEducation"></div>
</div>

</div>

</div>

<script src="script.js"></script>

</body>
</html>

CSS Code

*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:'Segoe UI',Arial;
}

body{
display:flex;
gap:30px;
padding:30px;
background:#042354;
justify-content:center;
}

/* Form */

.container{
width:35%;
background:white;
padding:25px;
border-radius:16px;
box-shadow:0 10px 30px rgba(0,0,0,0.08);
height:95vh;
overflow:auto;
}

input, textarea, select{
width:100%;
padding:10px;
margin-bottom:12px;
border:1px solid #e5e7eb;
border-radius:8px;
font-size:14px;
}

textarea{
resize:none;
height:80px;
}

button{
width:100%;
padding:10px;
border:none;
background:#2563eb;
color:white;
border-radius:8px;
cursor:pointer;
font-weight:600;
margin-bottom:10px;
}

button:hover{
background:#1d4ed8;
}

/* Resume */

.preview{
width:794px;
min-height:1123px;
background:white;
border-radius:10px;
overflow:hidden;
display:flex;
}

.sidebar{
width:30%;
background:#1e293b;
color:white;
padding:30px 20px;
}

.sidebar h1{
font-size:22px;
margin-bottom:5px;
}

.sidebar h3{
font-size:14px;
margin-bottom:15px;
color:#cbd5e1;
}

.sidebar p{
font-size:13px;
margin-bottom:6px;
}

.sidebar h2{
margin-top:20px;
margin-bottom:10px;
font-size:14px;
text-transform:uppercase;
border-bottom:1px solid rgba(255,255,255,0.2);
padding-bottom:5px;
}

.main{
width:70%;
padding:40px;
}

.section{
margin-bottom:25px;
cursor:move;
}

.section h2{
font-size:16px;
margin-bottom:10px;
border-bottom:2px solid #2563eb;
padding-bottom:5px;
}

.section p{
font-size:14px;
margin-bottom:8px;
line-height:1.5;
}

ul{
margin-left:18px;
}

ul li{
font-size:14px;
margin-bottom:6px;
}

/* Templates */

.template-corporate .sidebar{
background:#0f172a;
}

.template-modern .sidebar{
background:#111827;
}

.template-modern .section h2{
border-bottom:2px solid #38bdf8;
}

Javascript Code

const nameInput = document.getElementById("name")
const titleInput = document.getElementById("title")
const emailInput = document.getElementById("email")
const phoneInput = document.getElementById("phone")
const summaryInput = document.getElementById("summary")
const skillsInput = document.getElementById("skills")

const pName = document.getElementById("pName")
const pTitle = document.getElementById("pTitle")
const pContact = document.getElementById("pContact")
const pSummary = document.getElementById("pSummary")
const pEducation = document.getElementById("pEducation")
const pExperience = document.getElementById("pExperience")
const pSkills = document.getElementById("pSkills")

const educationList = document.getElementById("educationList")
const experienceList = document.getElementById("experienceList")

/* Create Inputs */

function createInput(container,value=""){
const input = document.createElement("input")
input.placeholder="Enter details"
input.value=value
input.addEventListener("input", saveData)
container.appendChild(input)
}

document.getElementById("addEducation").onclick = ()=>createInput(educationList)
document.getElementById("addExperience").onclick = ()=>createInput(experienceList)

/* Generate Resume */

document.getElementById("generateBtn").onclick = generateResume

function generateResume(){

pName.innerText = nameInput.value || "Your Name"
pTitle.innerText = titleInput.value
pContact.innerText = emailInput.value + " | " + phoneInput.value
pSummary.innerText = summaryInput.value

pEducation.innerHTML=""
educationList.querySelectorAll("input").forEach(e=>{
if(e.value) pEducation.innerHTML += `<p>${e.value}</p>`
})

pExperience.innerHTML=""
experienceList.querySelectorAll("input").forEach(e=>{
if(e.value) pExperience.innerHTML += `<p>${e.value}</p>`
})

pSkills.innerHTML=""
skillsInput.value.split(",").forEach(s=>{
if(s.trim()) pSkills.innerHTML += `<li>${s.trim()}</li>`
})

saveData()
}

/* Save Data */

function saveData(){

const data = {
name:nameInput.value,
title:titleInput.value,
email:emailInput.value,
phone:phoneInput.value,
summary:summaryInput.value,
skills:skillsInput.value,
education:Array.from(educationList.querySelectorAll("input")).map(i=>i.value),
experience:Array.from(experienceList.querySelectorAll("input")).map(i=>i.value)
}

localStorage.setItem("resumeData", JSON.stringify(data))
}

/* Load Data */

function loadData(){

const data = JSON.parse(localStorage.getItem("resumeData"))

if(!data) return

nameInput.value=data.name
titleInput.value=data.title
emailInput.value=data.email
phoneInput.value=data.phone
summaryInput.value=data.summary
skillsInput.value=data.skills

data.education.forEach(val=>createInput(educationList,val))
data.experience.forEach(val=>createInput(experienceList,val))

generateResume()
}

/* Template Switch */

document.getElementById("templateSelect").onchange = function(){

document.getElementById("resumePreview").className =
"preview template-"+this.value

}

/* Download PDF */

document.getElementById("downloadBtn").onclick=function(){

const element=document.getElementById("resumePreview")

const opt={
margin:0,
filename:'resume.pdf',
image:{type:'jpeg',quality:1},
html2canvas:{scale:3},
jsPDF:{unit:'mm',format:'a4',orientation:'portrait'}
}

html2pdf().set(opt).from(element).save()

}

/* Drag Sections */

let dragSrc

document.querySelectorAll(".section").forEach(sec=>{

sec.addEventListener("dragstart",()=>{ dragSrc = sec })

sec.addEventListener("dragover",(e)=>{ e.preventDefault() })

sec.addEventListener("drop",()=>{
if(dragSrc !== sec){
sec.parentNode.insertBefore(dragSrc, sec)
}
})

})

loadData()
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Related Projects

Day 5 : Chat UI (Frontend Only)

A simple chat interface with message sending and display functionality.

Concepts: DOM manipulation, event handling, dynamic UI updates.

Day 6 : File Upload Progress Bar

File upload interface with a visual progress bar and smooth animation.

Concepts: File API, progress tracking, animations, event handling.

Day 10 : Portfolio Website Builder

Displays animated skeleton loaders while content is loading.

Concepts: Loading states, animations, UI placeholders.