I am working on a puzzle given in below link
Semantics
It has 3 questions:
Update the website's HTML to make use of semantic elements so that:
The classless outer div element is replaced with a more appropriate element.
The divs with the image and caption classes are replaced with self-contained content elements.
The divs with the lorem-ipsum and description classes are replaced with elements, so that by default only the contents of the description element are shown. When the contents of the description element are clicked, the visibility of the rest of the lorem-ipsum element is toggled.
I tried adding class to outer div as <div class="header">
and <div class="container">
. Adding a Div section to contain the image and caption and also other ways to solve the puzzle, but none of them are working, the test cases are not successful.
Can you please tell me what is the right approach for this puzzle.
Take a look at: https://www.w3schools.com/html/html5_new_elements.asp
for example:
<main>
instant of the <div>
over all elements<figure>
instant of the <div>
for the image<figcaption>
instant of the <div>
for the image captionI used following semantic elements and it worked.
<main>
instead of <div>
over all elements<figure>
instead of <div>
for the image<figcaption>
instead of <div>
for the image caption<details>
instead of <div>
for lorem-ipsum
class<summary>
instead of <div>
for description
classIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With