I created a inside a link, to make the div link's child, but I don't know why the parent link is appearing inside the div. I am new to html/css, please help me. and tell what are things I should know to not make those mistakes
here is my code
https://codepen.io/Poink/pen/OJwJdrP
<a href="https://zoro.to/steinsgate-3?ref=search">
<div >
<div >Steins Gate</div>
<div ><span style="color: rgb(168, 164, 164);">⭐9.09</span></div>
<div ><span style="color: rgb(168, 164, 164);">Ep24/24</span></div>
<div ></div>
<div ><span style="color: rgb(0, 0, 0);">TV</span></div>
<div >
<span style="color: rgb(168, 164, 164);">
The self-proclaimed mad scientist Rintarou
Okabe rents out a room in a rickety old building in
Akihabara, where he indulges...
</span>
</div>
thanks for your help.
CodePudding user response:
You are not closing all div, that is why displaying link into div
<body>
<div >
<div ></div>
<div >Steins Gate</div>
<div ></div>
<div >SUB</div>
<div >DUB</div>
<div >Ep24/24</div>
<div >Steins Gate</div>
<div > <span style="color: gray;">TV</span></div>
<div ></div>
<div > <span style="color: gray;">24m</span></div>
</div>
<a href="https://zoro.to/steinsgate-3?ref=search">
<div >
<div >Steins Gate</div>
<div ><span style="color: rgb(168, 164, 164);">⭐9.09</span></div>
<div ><span style="color: rgb(168, 164, 164);">Ep24/24</span></div>
<div ></div>
<div ><span style="color: rgb(0, 0, 0);">TV</span></div>
<div ><span style="color: rgb(168, 164, 164);">The self-proclaimed mad scientist Rintarou
Okabe rents out a room in a rickety old building in
Akihabara, where he indulges...</span>
</div>
</div>
</a>
</body>
</html>