HTML (Index.html)
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Página Principal</title>
<link rel="stylesheet" href="./styles/styles.css">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="index.html">Inicio</a></li>
<li><a href="about.html">Sobre mí</a></li>
</ul>
</nav>
</header>
<main>
<h1>Bienvenido a mi sitio web</h1>
<p>Este es un ejemplo de sitio web con encabezado estilizado.</p>
</main>
<footer>
<p>© 2025 Mi Sitio Web. Todos los derechos reservados.</p>
</footer>
</body>
</html>
about.html
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sobre mí</title>
<link rel="stylesheet" href="./styles/styles.css">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="index.html">Inicio</a></li>
<li><a href="about.html">Sobre mí</a></li>
</ul>
</nav>
</header>
<main>
<h1>Sobre mí</h1>
<p>Esta es la página donde hablaré sobre mí.</p>
</main>
<footer>
<p>© 2025 Mi Sitio Web. Todos los derechos reservados.</p>
</footer>
</body>
</html>
styles/styles.css
/* Estilos generales */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
/* Encabezado */
header {
background-color: #333;
color: white;
padding: 15px 0;
text-align: center;
}
nav ul {
list-style: none;
padding: 0;
}
nav ul li {
display: inline;
margin: 0 15px;
}
nav ul li a {
color: white;
text-decoration: none; /* Eliminando el subrayado */
font-weight: bold;
}
nav ul li a:hover {
text-decoration: underline;
}
/* Contenido principal */
main {
padding: 20px;
text-align: center;
}
/* Pie de página */
footer {
background-color: #222;
color: white;
text-align: center;
padding: 10px 0;
position: relative;
bottom: 0;
width: 100%;
}