I need help in adding elements in Javascript to this page. My Homepage My Name About Education Work Experience Skills About Me Write a brief introduction about yourself here. Education Degree name and institution Another degree name and institution Work Experience Company name, position, duration Another company name, position, duration Skills Skill 1 Skill 2 Skill 3 © Your Name, 2023 style.css body { font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 0; } header { background-color: #333; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 10px; } h1 { font-size: 36px; margin: 0; } nav ul { display: flex; list-style: none; margin: 0; } nav li { margin-right: 20px; } nav a { color: #fff; text-decoration: none; } nav a:hover { text-decoration: underline; } main { max-width: 800px; margin: 0 auto; padding: 20px; } h2 { font-size: 24px; margin-top: 40px; } ul { list-style: disc; margin-left: 20px; } footer { background-color: #333; color: #fff; text-align: center; padding: 10px; }
I need help in adding elements in Javascript to this page.
<!DOCTYPE html>
<html>
<head>
<title>My Homepage</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>My Name</h1>
<nav>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#education">Education</a></li>
<li><a href="#work">Work Experience</a></li>
<li><a href="#skills">Skills</a></li>
</ul>
</nav>
</header>
<main>
<section id="about">
<h2>About Me</h2>
<p>Write a brief introduction about yourself here.</p>
</section>
<section id="education">
<h2>Education</h2>
<ul>
<li>Degree name and institution</li>
<li>Another degree name and institution</li>
</ul>
</section>
<section id="work">
<h2>Work Experience</h2>
<ul>
<li>Company name, position, duration</li>
<li>Another company name, position, duration</li>
</ul>
</section>
<section id="skills">
<h2>Skills</h2>
<ul>
<li>Skill 1</li>
<li>Skill 2</li>
<li>Skill 3</li>
</ul>
</section>
</main>
<footer>
<p>© Your Name, 2023</p>
</footer>
</body>
</html>
style.css
body {
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
margin: 0;
}
header {
background-color: #333;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
}
h1 {
font-size: 36px;
margin: 0;
}
nav ul {
display: flex;
list-style: none;
margin: 0;
}
nav li {
margin-right: 20px;
}
nav a {
color: #fff;
text-decoration: none;
}
nav a:hover {
text-decoration: underline;
}
main {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h2 {
font-size: 24px;
margin-top: 40px;
}
ul {
list-style: disc;
margin-left: 20px;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
}
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images