<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>
I dont know why the second image is not appearing here in the forum but in the codeacademy editor it appears. My question is: when i write
<a href="url" , Do i need to write http://? Or can i just write www.thewebsiteiwanttouse.com? Because it seems to work either way.
<Below this line, add a link to the EXACT exercise that you are stuck at.>
HTML Basics part 12
<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
<img src="https://s3.amazonaws.com/codecademy-blog/assets/f3a16fb6.jpg" />
<img src="http://orig09.deviantart.net/96a5/f/2009/361/1/e/majin_vegeta_by_aznfanaticwarrior.png" />
Replace this line with your code.
<do not remove the three backticks above>
you should use
<a> opening tag is missing the
> and the closing tag (
</a>) seem to be missing altogether.
But in the instructions it says that when inserting a link, he first “
<a” tag doesnt have the "
>"closing tag. But yes i am missing the closing “
that is not possible,
<a> should still have a closing
<a href="url">click me</a>
Oh yes sorry i didnt explain my self very well. I meant it didnt have it right after the “a” like in other tags such as “p” or “h3”.
what? no? if you add attributes (like href) the
> should be after the attribute, paragraphs can also have attributes:
<p style="color: red">i am a paragraph</p>
see how the
> is after the attribute? (in case it isn’t obvious, this will make the text red)
attributes are in essences added to opening tag (like
<p>) which means they come before the closing
> of the opening tag
I understand now. Sorry but its my first time learning code in my life, I didnt understand what the attribute is. The attribute is what’s between the tag right?
attributes are things we add to opening tag, so far you have seen 3:
and i just showed you
so anything which is added to opening tag, is an attribute. There are obviously more, which you will learn while you progress through the course
Wait about the http part. In the examples of the instructor it shows
<a href="https://www.codecademy.com" but if i write just www.codeacademy.com it still works. So is the “https://” part actually important?
the code will work in both cases (it is a valid url), but if you right click the linked image, and select: open in new tab, only the one with
http(s) will work, since then codecademy it has to open a specific webpage, where
www.codecademy.com it thinks it need to open the file called
www.codecademy.com from the same directory as the current page. Bit tricky maybe a bit for now, read this later again
Both will work to pass the exercise, that is important for now
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.