html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Layout</title>
<link rel="stylesheet" href="css/layout.css">
</head>
<body>
<div id="cabecera">
<h1>Esto es la cabecera</h1>
</div>
<div id="barra">
<ul>
<li><a href="">Inicio</a></li>
<li><a href="">Contacto</a></li>
<li><a href="">Productos</a></li>
<li><a href="">faq</a></li>
</ul>
</div>
<div id="contenido">
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita omnis.</p>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita omnis.</p>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita omnis.</p>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita omnis.</p>
</div>
<div id="pie">
<p>(c) Jotapé 2021</p>
</div>
</body>
</html>
css:
*{
margin:0;
}
#cabecera{
background-color: pink;
height: 150px;
margin: 0;
padding: 5px;
}
#barra{
background-color: turquoise;
width:100px;
float:left;
min-height: 500px;
padding: 20px;
}
#barra ul{
list-style: none;
margin:0;
padding: 5px;
}
#contenido{
background-color: wheat;
margin: 0;
min-height: 500px;
padding: 20px;
}
#pie{
background-color: black;
color: white;
height: 50px;
clear:left;
margin: 0;
}
Semántico:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Layout</title>
<link rel="stylesheet" href="css/layout.css">
</head>
<body>
<header>
<h1>Esto es la cabecera</h1>
</header>
<aside>
<ul>
<li><a href="">Inicio</a></li>
<li><a href="">Contacto</a></li>
<li><a href="">Productos</a></li>
<li><a href="">faq</a></li>
</ul>
</aside>
<main>
<section>
<h1>Artículo 1</h1>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas
obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita
omnis.</p>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas
obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita
omnis.</p>
</section>
<section>
<h1>Artículo 2</h1>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas
obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita
omnis.</p>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Assumenda quasi explicabo, quibusdam quas
obcaecati aliquam mollitia ad rerum maxime facere dolor, earum nisi in deleniti sit tempore nam expedita
omnis.</p>
</section>
</main>
<footer>
<p>(c) Jotapé 2021</p>
</footer>
</body>
</html>
*{
margin:0;
}
header{
background-color: pink;
height: 150px;
margin: 0;
padding: 5px;
}
header h1{
text-align: center;
}
aside{
background-color: turquoise;
width:100px;
float:left;
min-height: 500px;
padding: 20px;
}
aside ul{
list-style: none;
margin:0;
padding: 5px;
}
main{
background-color: wheat;
margin: 0;
min-height: 500px;
padding: 20px;
}
footer{
background-color: black;
color: white;
height: 50px;
clear:left;
margin: 0;
}
section{
float:left;
width: 40%;
margin-left: 10px;
}