1

Why won´t my img tag work in IE8? but IN ff? and chrome?

validation Output: 2 Errors

 Line 17, Column 47: an attribute value literal can occur in an attribute specification list only after a VI delimiter
"<img src="images/helhjartat_slutliga.jpg" alt"logga">"
✉
Have you forgotten the "equal" sign marking the separation between the attribute and its declared value? Typical syntax is attribute="value".

 Line 17, Column 48: end tag for "img" omitted, but OMITTAG NO was specified
"<img src="images/helhjartat_slutliga.jpg" alt"logga">"
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

 Line 17, Column 2: start tag was here
"<img src="images/helhjartat_slutliga.jpg" alt"logga">"
seb
  • 11
  • 1
  • 2

4 Answers4

1

You forgot the equals and closing the tag

<img src="images/helhjartat_slutliga.jpg" alt="logga" />

<img src="images/helhjartat_slutliga.jpg" alt="logga" />

<img src="images/helhjartat_slutliga.jpg" alt="logga" />
gcores
  • 12,376
  • 2
  • 49
  • 45
0

You are missing an equal sign after alt and for XHTML you should close the img tag approprietly:

<img src="images/helhjartat_slutliga.jpg" alt="logga" />
halfdan
  • 33,545
  • 8
  • 78
  • 87
0

At a guess, you've set your DOCTYPE to strict XHTML, which means your img tag isn't correctly formed, try either changing the DOCTYPE to a more loose version, or amend your img tags..

<img src="images/helhjartat_slutliga.jpg" alt="logga" />
trickwallett
  • 2,418
  • 16
  • 15
0

first of all you have to write alt="logga" and not alt"logga"

and secondly you have to close your tag.

either you close you tag directly by replacing the trailing > with /> (optionally add a further space)

or you provide the closing tag

why is it working in FF and Chrome? Because they are much more generous than - in this case - IE8

I hope this answers your question ;) If i got your question wrong, please forgive me

Zobbl
  • 469
  • 4
  • 18