DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Site Building & Maintenance

Reply
 
Thread Tools Display Modes
Old 05-12-2006, 09:37 AM   #1
dthomsen8
Member
 
dthomsen8's Avatar
 
Join Date: Aug 2005
Location: Philadelphia, PA 19130
Posts: 2,158
Default Astonishing Source Code View

http://www.newproperty4sale.com/index.htm

has an astonishing source code view. Normally we expect a DOCTYPE, <html> tag, <head> and <body> tags, and closing tags for those three tags. The source code here starts out with styles and scripts, and then some HTML, but the usual DOCTYPE, <html> tag, <head> and <body> tags are nowhere to be seen.

I am guessing that what we see in the source code view is the result of some PHP or other scripting, but beyond that guess, I am astonished that the browsers render this material as we might expect conventional HTML pages.

I post this merely out of curiosity, I have nothing to do with this real estate site or the information presented there.
dthomsen8 is offline   Reply With Quote
Old 05-12-2006, 10:43 AM   #2
donmcc
Member
 
Join Date: Feb 2005
Location: Sarnia, Canada
Posts: 1,122
Default

Quote:
Originally Posted by dthomsen8
I am guessing that what we see in the source code view is the result of some PHP or other scripting, but beyond that guess, I am astonished that the browsers render this material as we might expect conventional HTML pages.
I doubt it. PHP pages should also have the various codes you mention. I think this is a case of someone thinking that because it works, it must be okay. However, that is no sign that it will work tomorrow. This is invalid HTML, and I suspect some browsers will ignore it. If not, some day one will. I kinda hope it belongs to someone planning to buy a house.
donmcc is offline   Reply With Quote
Old 05-12-2006, 12:05 PM   #3
iamback
Member
 
iamback's Avatar
 
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
Default

Quote:
Originally Posted by dthomsen8
http://www.newproperty4sale.com/index.htm

has an astonishing source code view. Normally we expect a DOCTYPE, <html> tag, <head> and <body> tags, and closing tags for those three tags. The source code here starts out with styles and scripts, and then some HTML, but the usual DOCTYPE, <html> tag, <head> and <body> tags are nowhere to be seen.
Even in HTML 4, the <html>, <head> and <body> elements are optional. The head and body sections are still there, but by implication: they always exist, even if not declared. You can use a starting tag but leave out the closing tag, or like here even leave all of those tags out.

The document starts with a style element, followed by a script element. Since those elements can occur only in the head section, that part of the document is the head section - never mind the tags aren't there to declare it. These two elements are then followed by a number of div elements, which can occur only in the body section: so that part of the document is the body section. All in order so far.

There's really only one thing wrong with it that jumps to the eye, and that's the missing but always required DOCTYPE declaration. I didn't validate it, but if you try, tell the validator to treat it as HTML 4.01 - that's what it's closest to (though I note a <br /> which woudl be XHTML). So it won't be fully valid even with an appropriate DOCTYPE declaration but glancing over it nothing jumps out at me, it's probably not far off.

Seeing there's MM_ stuff in the script, my guess is it was made with an older version of DreamWeaver (4 or so) which was pretty ignorant about DOCTYPE declarations...

My advice: stick to XHTML: no worries about what is or is not optional: nothing is. Much simpler, all in all.

   
__________________
Marjolein Katsma
Look through my eyes on Cultural Surfaces (soon!), My ArtFlakes shop and Flickr.
Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog
iamback is offline   Reply With Quote
Old 05-12-2006, 12:36 PM   #4
donmcc
Member
 
Join Date: Feb 2005
Location: Sarnia, Canada
Posts: 1,122
Default

I wondered if the MM stuff was cut and pasted in. I used DW as far back as 2.0, and it never created pages without proper html, head, title, and body tags.
donmcc is offline   Reply With Quote
Old 05-12-2006, 01:50 PM   #5
iamback
Member
 
iamback's Avatar
 
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
Default

Quote:
Originally Posted by donmcc
I wondered if the MM stuff was cut and pasted in. I used DW as far back as 2.0, and it never created pages without proper html, head, title, and body tags.
Could be - I never used it, but I do know it was past 2000 before it learned to put in a DOCTYPE declaration (at the suggestion for Allaire, mainly).

Still, not using them is correct through HTML 4.01 (though it's rarely seen) - the one thing basically incorrect is teh mising declaration that would tell you whether it is, in fact, correct - or not if they intended it to be XHTML.

   
__________________
Marjolein Katsma
Look through my eyes on Cultural Surfaces (soon!), My ArtFlakes shop and Flickr.
Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog
iamback is offline   Reply With Quote
Old 05-12-2006, 02:01 PM   #6
PeterArnel
Member
 
Join Date: Jan 2005
Location: North of Swindon in the UK on the edge of the Cotswolds
Posts: 997
Default

I went to an exhibition in London and saw softweare that could generate these pages - it was produced by a company that used to specialize in changing typefaces to specials - I cant remember its name
Peter
PeterArnel is offline   Reply With Quote
Reply

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hex code for silver dacoyle Print Design 8 10-27-2006 09:38 PM
Who owns the code? Linda Baldwin General Publishing Topics 15 03-31-2006 05:06 PM
Valid code, or perhaps not... Bo Aakerstrom Web Site Building & Maintenance 5 03-01-2006 12:43 PM
GoLive Layout view not same as preview. imatt Web Site Building & Maintenance 10 09-14-2005 08:49 AM


All times are GMT -8. The time now is 06:01 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.