Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-17-2005, 02:45 PM
Dragonsi's Avatar
WebProWorld Veteran
 

Join Date: Dec 2003
Location: Wales (UK)
Posts: 343
Dragonsi RepRank 0
Default XHTML and DreamWeaver

Hi all,

When I create a new page with 'make XHTML complaint' tick in DreamWeaver MX, it inserts the following as standard:

Quote:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
I am wrong, but shouldn't the first line always be - <!DOCTYPE.... and if so, where should I move the '<?xml version....' line to?
__________________
www.westwalesweb.com
Website development & ICT solutions.
Reply With Quote
  #2 (permalink)  
Old 01-17-2005, 03:26 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default XHTML Doctype and the XML declaration

The doctype is usually the first line of any XHTML document, it's also an essential part of the document!
Some documents may contain an additional XML declaration (see below)

Quote:
Originally Posted by the W3C XHTML Spec
An XML declaration is not required in all XML documents; however XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol.
You could remove the XML declaration from the top of the page's code, but don't try inserting it elsewhere! :o)

Paul
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0