0

<ul> <li><a https://www.z.us>z</li> </ul>

Whats wrong with this code?

17th Dec 2023, 10:09 AM
Selvam G
Selvam G - avatar
5 Réponses
+ 6
a tag.
17th Dec 2023, 10:40 AM
JaScript
JaScript - avatar
+ 5
anchor tag has no closing & link goes to the href attribute. <ul><li><a href="https://www.z.us>z</a></li></ul>
17th Dec 2023, 10:42 AM
zexu knub
zexu knub - avatar
+ 3
Hi Selvam, You need to add 'href' in anchor tag and also you missed the double quote from start to end in your link . <ul> <li> <a href="https://www.z.us">z</a> </li> </ul> href stands for hypertext reference. It is used for links. I hope I answered your question.
17th Dec 2023, 8:15 PM
Ayush Raj
+ 2
Every container you open must be closed, within the container it was nested inside. In this case, you opened: <ul>, <li>, and <a> containers You closed only the </li> and </ul> ones. </a> needs to be closed before you close the </li> container because that is the block level element that it is nested within.
17th Dec 2023, 7:01 PM
StuartH
StuartH - avatar
+ 1
Thanks everyone
17th Dec 2023, 8:47 PM
Selvam G
Selvam G - avatar