Can someone tell me the difference between these?

Can someone tell me the difference between these?
0.0 0

#1

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:


#2

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


#3

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:


#4

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.


#5

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.


#6

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:


#7

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


#8

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>


#9

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:


#10

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.


#11

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.


#12

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.