Improvement made in Optimization

Header and Footer Elements: Added <header> and <footer> elements for better semantic structure. This makes the page more readable and accessible.
Main Element: Wrapped the main content (#joke and button) inside a <main> tag, which is more semantic and helps with SEO and accessibility.
Updated Meta Tags: Still kept the meta tags for better SEO (description, author).
Accessible Button: The button has an aria-label to improve accessibility for screen readers.
Content Enhancement: Added a small description in the <footer> to encourage interaction.
pull/213/head
Kelvin Yeboah 9 months ago committed by GitHub
parent 9409685c9a
commit e0ca7fbc13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,15 +3,27 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Get a random dad joke every time you click the button! Can you not laugh?" />
<meta name="author" content="Your Name or Username" />
<title>Don't Laugh Challenge - Dad Jokes</title>
<link rel="stylesheet" href="style.css" />
<title>Dad Jokes</title>
</head>
<body>
<div class="container">
<h3>Don't Laugh Challenge</h3>
<div id="joke" class="joke">// Joke goes here</div>
<button id="jokeBtn" class="btn">Get Another Joke</button>
<header>
<h1>Don't Laugh Challenge</h1>
<p>Can you keep a straight face? Click below for your next joke!</p>
</header>
<main>
<div id="joke" class="joke">Loading joke...</div>
<button id="jokeBtn" class="btn" aria-label="Get another dad joke">Get Another Joke</button>
</main>
<footer>
<p>Challenge your friends to see who can keep a straight face the longest!</p>
</footer>
</div>
<script src="script.js"></script>
</body>
</html>

Loading…
Cancel
Save