XHTML and & nbsp not working?

Hi, I have been a web developer for a long time, before, when I wanted to put a space between two images, I would use & nbsp in HTML, but is XHTML different? Looking into the net, but not diving, can someone kindly help?

Here is my code;

<img id ="aft" src="images/after_clamping.jpg" width="200" height="210" alt="" /><img id ="tic" src="images/ticket.jpg" width="200" height="210" alt="" /> 
+6
source share
1 answer

Some XHTML configurations do not have a complete list of entity names. Use a reference to a numeric character, &#160;

Edit: “Some XHTML configurations” means XHTML documents without a full XHML DOCTYPE declaration. If you omit DOCTYPE altogether or use a shortened version, for example, <!DOCTYPE html> , the browser recognizes only five XML entity names. Therefore, either provide the full DOCTYPE, for example, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> , or use numeric character references as above.

+12
source

Source: https://habr.com/ru/post/947240/


All Articles