<body>
<header>
<h1>Deep Thoughts with Master Camper Cat</h1>
</header>
<article>
<h2>Defeating your Foe: the Red Dot is Ours!</h2>
<p>Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightening speed. But chin up, fellow fighters, our time for victory may soon be near. Click here for <a href="information about batteries">information about batteries</a>.</p>
</article>
</body>
Are you using chrome?
Also the href attribute should have a link or make it a dead link with ā#ā if you do not have link.
Which challenge is this?
Where in the challenge instructions did it tell you to add āinformation about batteriesā as the href attributeās value?
In the future, either tell us the challenge url or click on the Ask a Question button located on the challenge. The latter will add your code and the challenge url to the topic automatically.
Hi there, yes! chrome
" Applied Accessibility: Give Links Meaning by Using Descriptive Link Text"
It says to " Move the anchor ( a
) tags so they wrap around the text āinformation about batteriesā instead of āClick hereā.", which I did.
But the is somehow not seen by the compiler
I was able to solve the challenge. You are just moving the a tags to wrap around āinformation about batteriesā instead of āClick hereā.
You should not have anything besides āā in the href attribute. You are not supposed to change that. That is why you are getting the error.
oh hell that did it; why does that make sense though?
edit: thank you by the way, this helped!
if I had the same text within the href attribute, my output looks the same from the user end; so why is it wrong to have text within an href attribute (in this case)?
the href
attribute is where the anchor point, it doesnāt have sense to have a sentence there instead of an url, and information about batteries
is not a valid url
https://www.w3schools.com/tags/att_a_href.asp
The href attribute is supposed to have a link destination, that is why.
href=āinformation about batteriesā That is not a link to any destination
From the link above:
Possible values of href:
- An absolute URL - points to another web site (like href=āhttp://www.example.com/default.htmā)
- A relative URL - points to a file within a web site (like href=ādefault.htmā)
- Link to an element with a specified id within the page (like href="#top")
- Other protocols (like https://, ftp://, mailto:, file:, etcā¦)
- A script (like href=ājavascript:alert(āHelloā);ā)
In this specific case, the tests where not expecting anything but a blank string string for the href attributeās value. I have created a pull request which will add another test to specifically check for the blank string (and give applicable message), so the test for the closing anchor tag is not part of the test for the href attribute. This should make the challenge tests a bit clearer for future users.
Ah okay thatās starting to make sense. So, in what case would the test expecting a non-blank string (a string with something in it)?
Thanks for the pull request, itāll definitely clarify it for future users
ohhhh that makes sense now.
so href attributes will only have links (www.stuff.com), protocols, scripts, but never just plain text āhelloā
ah okay got it. thank you so much!
There are no tests like that for this particular challenge. Other challenges will possibly expect a value (i.e. url or hash character).
Thank you. It worked!