Good to all.
There is a famous validator HTML code - validator.w3.org.
But why does he report an error to such a string?
(Error: "inappropriate mark" > "")

<img src="images/candle_right.jpg" style="position: absolute; top:120px; left:10px; z-index:0;"> 

And here "mistakenly put" > "", which after 16px;

 <div style="height:16px;"></div> 

I would like to understand why this is considered a mistake?

  • Put a space in front of it. - ReinRaus
  • What!? style in code? Yes, I'll give you my hands right now! Show the full code. It is not always possible to tell by the flown off boot whether its owner is alive. - Gordio Sep.
  • one
    1. It all depends on the type of site you are validating: HTML 4, HTML 5, XHTML? 2. In the description, the img tag must have the alt attribute, which is not present. 3. Give a complete description (or screen) of what the validator says to you, it seems to me that the error and the description sound completely different. Otherwise, if I add alt to the img tag, my validation is successful on HTML5. With XHTML, a single tag can be demanded as <img src = "" alt = "" /> and, if I am not mistaken, the absence of empty tags (consider them to be single). - Alex Krass
  • The code is positioned as - HTML 4 • [Link to validator results] [1] [1]: validator.w3.org/… • [Full code (press CTRL + U in the browser]] [2] [2]: icar-soft .ru - I_CaR
  • By errors, if you read what the validator writes, then everything becomes clear: 1. Line 44, Column 7: all style tags should have the type attribute: <style type = "text / css"> ... 2. Line 191, Column 130: In the HEAD section there can be no display elements, in this case DIV 3. Line 220, Column 6: Comment in the comment, two times in a row <! - without ending 4. Line 226, Column 119 + more such pieces 14: You have the FONT tag being inline, and you cannot push block into the inline. In this case, a bunch of div tags inside the inline FONT. - Alex Krass

0