This example shows a main article with an <aside> on the side containing related article links. The aside has a light background and is separated visually.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aside Element Example</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 2rem;
display: flex;
gap: 2rem;
}
main {
flex: 3;
}
aside {
flex: 1;
background-color: #f0f0f0;
padding: 1rem;
border-radius: 0.5rem;
}
a {
color: #0066cc;
text-decoration: none;
}
a:hover, a:focus {
text-decoration: underline;
outline: none;
}
</style>
</head>
<body>
<main>
<h1>Welcome to My Gardening Blog</h1>
<p>Here you will find tips and tricks to help your plants grow healthy and strong.</p>
</main>
<aside aria-label="Related articles">
<h2>Related Articles</h2>
<ul>
<li><a href="#">How to Grow Tomatoes</a></li>
<li><a href="#">Best Soil for Flowers</a></li>
<li><a href="#">Watering Tips</a></li>
</ul>
</aside>
</body>
</html>