Are frames considered outdated in HTML5 and why?
Frames are considered outdated in HTML5 due to their lack of accessibility, SEO-friendliness, and responsiveness. Instead of using frames, it is recommended to use modern techniques like CSS Grid or Flexbox to create layouts that are more flexible and responsive. By using these techniques, you can create a more accessible and SEO-friendly website that adapts well to different screen sizes.
<!DOCTYPE html>
<html>
<head>
<title>Modern Layout Example</title>
<style>
.container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
}
.item {
background-color: #f2f2f2;
padding: 20px;
}
</style>
</head>
<body>
<div class="container">
<div class="item">Content 1</div>
<div class="item">Content 2</div>
</div>
</body>
</html>