style.css
setup.css
index.html
/* Setup styles are in the other file. */
a {
background-color: gold;
text-decoration: underline;
}
div:nth-child(2) a {
display: block;
margin-bottom: 10px;
padding: 10px;
text-decoration: none;
}
body {
font-family: sans-serif;
padding: 20px;
}
div {
background-color: deepskyblue;
border-top: solid black 4px;
padding: 10px;
}
div:not(:first-child) { margin-top: 20px; }
<!DOCTYPE html>
<html>
<head>
<title>Display block</title>
<link href="/assets/styles/reset.css" rel="stylesheet">
<link href="setup.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body>
<section>
<div>
<p><a href="#">Links are usually inline.</a> This is some text in the first element.</p>
</div>
<div>
<p><a href="#">But you’ll often want them block →</a> And some more in the second element.</p>
</div>
<div>
<p>Then a third one, too.</p>
</div>
</section>
</body>
</html>