I recently noticed that in some code, ie <br /> DW adds
the “/” in the code. It seems to work okay, but can’t be correct.
Any info would be appreciated.|||
Empty elements must either have an end tag or the start tag
must end with /> in XHTML 1.0. If your document is XHTML 1.0,
this is the correct markup.
quote:
Originally posted by:
pitzerwm
I recently noticed that in some code, ie <br /> DW adds
the “/” in the code. It seems to work okay, but can’t be correct.
|||
In DW, under Edit > Preferences > New Page, you
probably have Default
Document Type (DTD) = XHTML… something.
Or you have a XHTML DTD already in your pages. Check the
first line of code
for something like:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0
Transitional//EN”
”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
DW will therefore create your code so it is XHTML compatible,
which is
stricter syntax than regular HTML.
See
http://en.wikipedia.org/wiki/XHTML
esp. the Common Errors subheading where it shows typical
XHTML syntax such
as all tags must be closed e.g. <p></p> or
self-closed e.g. <br />.
In practical terms, you probably won’t notice any difference
in how your web
page looks in a browser.
–
Regards
John Waller
|||
Thanks|||
In DW, under Edit > Preferences > New Page, you
probably have Default
Document Type (DTD) = XHTML… something.
Or you have a XHTML DTD already in your pages. Check the
first line of code
for something like:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0
Transitional//EN”
”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
DW will therefore create your code so it is XHTML compatible,
which is
stricter syntax than regular HTML.
See
http://en.wikipedia.org/wiki/XHTML
esp. the Common Errors subheading where it shows typical
XHTML syntax such
as all tags must be closed e.g. <p></p> or
self-closed e.g. <br />.
In practical terms, you probably won’t notice any difference
in how your web
page looks in a browser.
–
Regards
John Waller
Related posts:
- "Setting and Retrieving Cookies" DreamWeaver 8
- cfinput type="checkbox" default value not posting
- accordian panel "flashes"
- Providing an "open/close" text for the accordionPanelTab
- Multiple head tags on instance pages
Related posts brought to you by Yet Another Related Posts Plugin.