Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDaria Aubry
8,518 PointsLink attribute in anchor tag
Hello, can someone help me to understand what purpose the 'link' attribute in the anchor element serves? As is the document to this lesson:
<a link href="#">My Link 1</a>
Thanks in advance :)
3 Answers
Steven Parker
231,275 PointsAccording to W3C, "link" is not an attribute for an anchor tag, nor is it a global attribute. You could use it as a CSS selector, something like this:
a[link] { background: red }
But there are better ways to handle that, and I don't see that being used in the video or examples. I think it's a mistake, but I'll try asking the support folks and let you know what they say.
Steven Parker
231,275 PointsThey wrote me back and said, " ...ask in the forum. Once you've posted this, our teachers can then provide assistance...". So I guess we wait and see if a teacher posts here.
Daria Aubry
8,518 PointsThanks for confirming my doubts. I was afraid I was grossly misunderstanding what I read on the w3c site... Thank you :)
Guil Hernandez
Treehouse TeacherHi everyone,
Great catch on the extra "link" text in the anchor elements. Yep, it's not supposed to be there – looks like it's a stray attribute that managed to stay around when building the course. It doesn't really affect anything, but still, it's not necessary.
I'm going to refresh many of those videos soon, so it will be fixed. For now, I removed it from all the project files and code challenges.
Thanks!
Shawn Flanigan
Courses Plus Student 15,815 PointsShawn Flanigan
Courses Plus Student 15,815 PointsGood question. As far as I know,
link
isn't a valid attribute...must be a mistake.