Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XHTML and &nbsp doesnt work?

Tags:

html

xhtml

Hi been out of web dev for a long time now, before when I wanted to put a space between two images i'd use &nbsp in HTML however XHTML is different? Been looking on the net but nothing is sinking in, could someone kindly help out?

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="" />
like image 506
MultiWizard Avatar asked Jun 13 '13 19:06

MultiWizard


1 Answers

Some XHTML configurations don't seem to have the full list of entity names. Use the numerical character reference, &#160;

Edit: "Some XHTML configurations" means XHTML documents without a full XHML DOCTYPE declaration. If you omit the DOCTYPE altogether, or use a shorthand one, like <!DOCTYPE html>, the browser will only recognise the five XML entity names. So either provide a full DOCTYPE, like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> or use numerical character references as above.

like image 57
Mr Lister Avatar answered Sep 28 '22 07:09

Mr Lister