Can someone tell me the difference between these?

I couldnt tell the difference between the two lines of code.
<a href="http://codepen.io/NerdBurglur/full/Vmrmqj/" <img src="https://s5.postimg.org/nf5nxyf93/15304182_1649919398638867_8795896090019587196_o.jpg>< /a>

<a href="http://codepen.io/NerdBurglur/full/Vmrmqj/" img src="https://s5.postimg.org/nf5nxyf93/15304182_1649919398638867_8795896090019587196_o.jpg"> </a>

edit: got it thanks :thumbsup:

hoping it was a random bug or something with codepenā€¦ i dont think there is a real answer

I donā€™t know what you are asking hereā€¦were you trying to post code snippets to the forum?

You can follow this guide to do that:

i explained it the best i couldā€¦ i was looking for a possible difference in the code. When i cut and pasted the 2 bits of code i was referring toā€¦ it just posted it as working code i.e the images(idk if the links worked i didnt try).

What i meant wasā€¦ what i wrote looked like this

a href=ā€œhttp://codepen.io/NerdBurglur/full/Vmrmqj/ā€ <img src=ā€œhttps://s5.postimg.org/nf5nxyf93/15304182_1649919398638867_8795896090019587196_o.jpgā€ /a

and it didnt workā€¦ so i looked up and old lesson to make sure i had things right and it showed this

a href="#" img src="# " /a

so i cut and pasted thatā€¦ put in my href link and imgā€¦ and that worked fine. Im just trying to figure out why it didnt work intially.

btw thanks for the link to forum codeā€¦ still learning. i will use triple ticks next time. And i also realize i wasnt specifc on what i was talking about. Im in the process of making a portfolio page, thats where i was trying to insert the code.

Oh I think I get it.

You were trying to include this in your portfolio:

<a href="http://codepen.io/NerdBurglur/full/Vmrmqj/">
  <img src="https://s5.postimg.org/nf5nxyf93/15304182_1649919398638867_8795896090019587196_o.jpg">
</a>

But it wasnā€™t working, and then you cut and pasted the example:

<a href="#"><img src="#"></a>

And switched the # for actual links, and then it worked, but you donā€™t know why?

Without seeing the originals, itā€™s hard to say for certain why it happened, but it is pretty easy to sometimes accidentally write something like

<a href"=#">

and not noticed youā€™ve switched the quote and the equals no matter how many times you look at itā€¦If the copy and paste fixed it, Iā€™d guess it was some small invisible typo like that causing the issue :slight_smile:

2 Likes

yep! thanks for checking back in! Im still learning how to correctly communicate what im encountering.

re: your very first post[quote=ā€œNerdBurglur, post:1, topic:62431ā€]

a href=ā€œhttp://codepen.io/NerdBurglur/full/Vmrmqj/ā€ <img src=ā€œhttps://s5.postimg.org/nf5nxyf93/15304182_1649919398638867_8795896090019587196_o.jpgā€ /a

a href=ā€œhttp://codepen.io/NerdBurglur/full/Vmrmqj/ā€ img

src=ā€œhttps://s5.postimg.org/nf5nxyf93/15304182_1649919398638867_8795896090019587196_o.jpgā€ /a
[/quote]
The difference between the two lines is:
first line: before img you have a ā€œ<ā€

PS - Iā€™m new and surprised that it works without using opening and closing tags on the anchors <a><img src="#"></a>

It doesnā€™t work without the brackets on the tags, but the forum software strips HTML code, so the poster was trying to work around it. :slight_smile:

You could try reading your code backwards to check for small invisible typos. It is a trick writers use to check their papers for grammatical and spelling errors. Small errors seem to be the death of new coders.

2 Likes

When you write your message you can use the </> icon to the right of the quotation marks and it will show the ā€˜bracketsā€™. { }, [ ], < > alternatively just use back ticks.

1 Like

When you write your message you can use the </> icon to the right of the quotation marks and it will show the ā€˜bracketsā€™. { }, , < > alternatively just use back ticks.