Certainly! Below is a simple example of a website that describes what you are capable of doing using HTML, CSS, and JavaScript.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Capabilities</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>What I Can Do</h1>
</header>
<main>
<section id="html">
<h2>HTML</h2>
<p>I can create structured web pages using HTML. This includes:</p>
<ul>
<li>Creating semantic HTML elements</li>
<li>Using forms and inputs</li>
<li>Embedding multimedia content</li>
</ul>
</section>
<section id="css">
<h2>CSS</h2>
<p>I can style web pages using CSS. This includes:</p>
<ul>
<li>Applying styles to HTML elements</li>
<li>Using Flexbox and Grid for layout</li>
<li>Creating responsive designs</li>
</ul>
</section>
<section id="js">
<h2>JavaScript</h2>
<p>I can add interactivity to web pages using JavaScript. This includes:</p>
<ul>
<li>Manipulating the DOM</li>
<li>Handling events</li>
<li>AJAX requests</li>
</ul>
</section>
</main>
<footer>
<p>© 2023 Your Name</p>
</footer>
<script src="scripts.js"></script>
</body>
</html>
styles.css
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background: #333;
color: #fff;
padding: 1rem 0;
text-align: center;
}
main {
padding: 1rem;
}
section {
margin-bottom: 2rem;
}
h2 {
color: #333;
}
ul {
list-style-type: none;
padding: 0;
}
ul li {
background: #fff;
margin: 0.5rem 0;
padding: 0.5rem;
border: 1px solid #ccc;
}
footer {
background: #333;
color: #fff;
text-align: center;
padding: 1rem 0;
position: fixed;
bottom: 0;
width: 100%;
}
scripts.js
document.addEventListener('DOMContentLoaded', function() {
console.log('Document is ready!');
// Example: Add a simple alert when the page loads
alert('Welcome to my capabilities page!');
// Example: Change the background color of sections on click
const sections = document.querySelectorAll('section');
sections.forEach(section => {
section.addEventListener('click', function() {
this.style.backgroundColor = '#e2e2e2';
});
});
});
Explanation
- HTML: The
index.html file sets up the basic structure of the webpage, including a header, main content area, and footer. Each section describes a different capability (HTML, CSS, JavaScript).
- CSS: The
styles.css file adds styles to make the page look better. It includes basic styling for the body, header, main content, sections, and footer.
- JavaScript: The
scripts.js file adds interactivity. In this example, it shows an alert when the page loads and changes the background color of sections when they are clicked.
You can save these files in the same directory and open index.html in a web browser to see the website in action.