I noticed one thing:
1. we have a simple img tag
2. If you insert into the line two tags with border = 0, then they will be right next to each other. Example:

<img src="pict.jpg"><img src="pict.jpg"> 
  1. And if you divide by enter

     <img src="pict.jpg"> <img src="pict.jpg"> 

then a space appears between them at exactly 3 px.
Why there is such a strange phenomenon, because the enter is not a displayable symbol.



    3 answers 3

    Who told you that the line break is not displayable? Just very much so. To avoid what happened to you, comment out the line break.

      <img src="pict.jpg"><!-- --><img src="pict.jpg"> 
    • Thank! Brilliant! :) This is from the category of hacks. - I_CaR

    Let's try to tell on the other hand img - a very interesting tag; behaves simultaneously as a block and as a string. if the parent element prescribe the css line-height rule: 0 ;, there will be no vertical space

    • Somehow it did not work on img - I_CaR

    In general, img is an inline (string) element , so it behaves like plain text. If you write img elements without space / line breaks, the images will go right next to each other.

    Of course, for the convenience of reading the code, it is better to write with a line break, in this case, to avoid unwanted spaces, you can use the following solutions:

    1. img {float: left; }

    2. for the parent element set: word-spacing: 0;

    3. take advantage of the comments , as advised by @knes .

    Good luck

    • Thank you, I'll try at leisure. - I_CaR