X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Closing Tag Question (https://forum.x-cart.com/showthread.php?t=37995)

Duramax 6.6L 03-02-2008 02:04 PM

Closing Tag Question
 
When closing a line is the following correct?

Standard line >
Image line />

I have been looking throgh the code and see quite a few of these.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="A full service store for oem and aftermarket performance parts." />

Is the closing /> wrong? Should it just be >?

kube 03-02-2008 02:13 PM

Re: Closing Tag Question
 
Hi Duramax,

No, it's not wrong. Empty HTML tags, the ones that do no not need an ending/closing tag, such as input, img, and meta should always end with /> to make an xhtml well-formed doc.

http://www.w3schools.com/tags/tag_meta.asp

http://www.javascriptkit.com/howto/xhtml_intro.shtml

Hope this helps.
Doms

Duramax 6.6L 03-02-2008 03:50 PM

Re: Closing Tag Question
 
Kube, thank you for the reading material.

is it true that && should actually be &amp;

kube 03-02-2008 04:30 PM

Re: Closing Tag Question
 
For valid XHTML it should be &amp; (as well as a few other html-encoded & types) but a straight & on its own should fail.

Language variables, in particular, seem to suffer from this and treat & as & rather than an &amp;


All times are GMT -8. The time now is 04:05 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.