Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > validate HTML

Reply
Thread Tools

validate HTML

 
 
shank
Guest
Posts: n/a
 
      09-23-2003
I'm on the W3 website and trying to validate my page. A BUNCH of problems
showed up. I'm using Dreamweaver MX and use it to create the code. This
should be a no brainer, but checking it for 4.01 transitional is dismal.

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">

One of the red flags is that the above margins are invalid attributes of the
<body> tag.
OK... How do I set my page to have "0" margins?
And why would Dreamweaver stick them in there?

Can someone give me a clue to conforming to the validation process?
I'm using vbScript and ASP and I'm not sure I will ever be able to comply
100%.
Has anyone else run into this?

thanks!


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      09-23-2003
In post <jJ2cb.7156$>
shank said...

> I'm on the W3 website and trying to validate my page. A BUNCH of problems
> showed up. I'm using Dreamweaver MX and use it to create the code. This
> should be a no brainer, but checking it for 4.01 transitional is dismal.


new documents should use the strict DTD

> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
> marginheight="0">
>
> One of the red flags is that the above margins are invalid attributes of the
> <body> tag.
> OK... How do I set my page to have "0" margins?


body{margin:0;padding:0;}

> And why would Dreamweaver stick them in there?


its a poor quality editor. just because "everybody" uses it doesn't
necessarily mean its good. look at IE.

> Can someone give me a clue to conforming to the validation process?


hand code. you'll know what every line does and why its there.

> I'm using vbScript and ASP and I'm not sure I will ever be able to comply
> 100%.


any page can validate 100%



--
24/September/2003 07:22:20 am
 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      09-23-2003
Gazing into my crystal ball I observed "shank" <>
writing in news:jJ2cb.7156$:

> I'm on the W3 website and trying to validate my page. A BUNCH of
> problems showed up. I'm using Dreamweaver MX and use it to create the
> code. This should be a no brainer, but checking it for 4.01
> transitional is dismal.
>
><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
> marginheight="0">
>
> One of the red flags is that the above margins are invalid attributes
> of the
><body> tag.
> OK... How do I set my page to have "0" margins?
> And why would Dreamweaver stick them in there?
>
> Can someone give me a clue to conforming to the validation process?
> I'm using vbScript and ASP and I'm not sure I will ever be able to
> comply 100%.
> Has anyone else run into this?
>
> thanks!
>
>
>


You're familiar with includes, so start including a style sheet definition
for your pages.

<link rel="stylesheet" href="style.css" type="text/css">

*** style.css ***
body {margin:0}

You might want to think about using another editor. I think you would be
happy with http:///www.html-kit.com , has syntax coloring, plugins (spell
check, Thesaurus, ASP specific tools), scripting to define frequently used
code (like sql select statements), HTML-Tidy, integrates with TopStyle for
stylesheets. Best of all, it's free.

Trust me, even though you're writing ASP, you'll be able to validate if you
stick to keeping HTML for the markup, CSS for presentation, and ASP/SQL for
serverside.

One more little hint: escape &'s as &amp;

CSS Tutorial: http://www.w3schools.com/css/default.asp
--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      09-23-2003
In post <Xns93FF93A05652arbpenyahoocom@207.115.63.158>
Adrienne said...

> body {margin:0}


margin on the <body> is actually incorrect. you cant have a margin
outside of the available canvas area. operas use of padding on the
<body> is correct.



--
24/September/2003 07:40:02 am
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      09-23-2003
Gazing into my crystal ball I observed brucie <-
html.org> writing in news:l7e41slvpcby$.:

> In post <Xns93FF93A05652arbpenyahoocom@207.115.63.158>
> Adrienne said...
>
>> body {margin:0}

>
> margin on the <body> is actually incorrect. you cant have a margin
> outside of the available canvas area. operas use of padding on the
><body> is correct.
>
>
>


Thanks, brucie. Another mystery of life solved.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      09-23-2003
shank wrote:

> I'm on the W3 website and trying to validate my page. A BUNCH of problems
> showed up. I'm using Dreamweaver MX and use it to create the code. This
> should be a no brainer, but checking it for 4.01 transitional is dismal.


At this point, you should use a strict DTD and validate your document.

>
> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
> marginheight="0">
>
> One of the red flags is that the above margins are invalid attributes of the
> <body> tag.
> OK... How do I set my page to have "0" margins?
> And why would Dreamweaver stick them in there?
>
> Can someone give me a clue to conforming to the validation process?
> I'm using vbScript and ASP and I'm not sure I will ever be able to comply
> 100%.
> Has anyone else run into this?
>
> thanks!
>
>


It's not recommendable to remove all padding and margin on the element
(body) rendering your content. Every known documents appearing on every
possible media use some kind of padding or margins. I personally use
this for all my pages.

<style type="text/css">
body {margin:16px; padding:0px; color:black; background-color:white;}
</style>

Browsers all have default margin (or padding like Opera 7) values for
the body element.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      09-23-2003
brucie wrote:

> In post <Xns93FF93A05652arbpenyahoocom@207.115.63.158>
> Adrienne said...
>
>
>>body {margin:0}

>
>
> margin on the <body> is actually incorrect. you cant have a margin
> outside of the available canvas area.


What are you saying exactly? Margin on the body element is rendered in
all W3C CSS1 compliant browsers. I don't understand why you said what
you said.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

 
Reply With Quote
 
Whitecrest
Guest
Posts: n/a
 
      09-23-2003
In article <>,
says...
> > And why would Dreamweaver stick them in there?

> its a poor quality editor. just because "everybody" uses it doesn't
> necessarily mean its good. look at IE.


Well personal opinion....

> > Can someone give me a clue to conforming to the validation process?

> hand code. you'll know what every line does and why its there.


You do not need to hand code every line to know what it does.

> > I'm using vbScript and ASP and I'm not sure I will ever be able to comply
> > 100%.

> any page can validate 100%


I will agree there. But validating the code does not mean that the page
looks good. You can have a mighty shitty looking validated page.

--
Whitecrest Entertainment
www.whitecrestent.com
 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      09-23-2003
In post <bkqfp9$qsb$>
DU said...

>> margin on the <body> is actually incorrect. you cant have a margin
>> outside of the available canvas area.


> What are you saying exactly? Margin on the body element is rendered in
> all W3C CSS1 compliant browsers. I don't understand why you said what
> you said.


if you consider the <body> element to be the available canvas area and
not the <html> element then padding is the space between the <body>
element and its content. that makes sense. i don't think anyone would
disagree with that.

<html>
<head>
</head>
<body>
<padding>
content of site
<padding>
</body>
</html>

if you consider <html> to be the available canvas area then margin is
the space between the <html> element and the <body> and <head>
element.

<html>
<margin>
<head>
</head>
<body>
content of site
</body>
<margin>
</html>


that just doesn't look right. its more logical to use padding on the
<body> element and the suggested CSS2 style sheet has padding 8px, no
margin.

--
24/September/2003 09:15:44 am
 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      09-24-2003
brucie wrote:
> In post <bkqfp9$qsb$>
> DU said...
>
>
>>>margin on the <body> is actually incorrect. you cant have a margin
>>>outside of the available canvas area.

>
>
>
>>What are you saying exactly? Margin on the body element is rendered in
>>all W3C CSS1 compliant browsers. I don't understand why you said what
>>you said.

>
>
> if you consider the <body> element to be the available canvas area and
> not the <html> element then padding is the space between the <body>
> element and its content. that makes sense. i don't think anyone would
> disagree with that.


Are you saying that borders and padding on the root element (html)
should not be rendered? Are you saying that margins on the body element
shouldn't be rendered? Are you saying that the body element can not
render margins? Are you saying that the body element does not comply
with CSS1 box model?

>
> <html>
> <head>
> </head>
> <body>
> <padding>
> content of site


What if the author inserts here:
<p style="position:absolute; top:-300px; left:-200px;">Filling here</p>

> <padding>
> </body>
> </html>
>
> if you consider <html> to be the available canvas area then margin is
> the space between the <html> element and the <body> and <head>
> element.
>


Is that so? margin on the body element should only be rendered if the
head has the rule {display:block}?

> <html>
> <margin>
> <head>
> </head>
> <body>
> content of site
> </body>
> <margin>
> </html>
>


Regardless of the way you define what is the available canvas area, I
still don't see why margins on the body element should not (or can not
or are preferable not to) be used in a style sheet in any/all conditions.

>
> that just doesn't look right. its more logical to use padding on the
> <body> element and the suggested CSS2 style sheet has padding 8px, no
> margin.
>


Margins are part of the CSS1 box model. Regardless of how you define the
available canvas area and why you need to define it, I don't see why
body {padding:<value>} is any better or superior to body
{margin:<value>}. IMO, these properties can both be used for the body
element and both should be rendered if used. FWIW, CSS2.1 uses margins
on the body element, not padding.

http://www.w3.org/TR/CSS21/sample.html

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I validate html produced by ajax (asynchronous dynamic html)? zzzbla@gmail.com HTML 7 05-13-2006 11:43 AM
Validate opening and closing of html tags Pradeep Java 8 04-18-2006 01:27 PM
confused - html validates, css validates but validate css from the html causes errors Titus A Ducksass - AKA broken-record HTML 6 11-15-2004 12:59 PM
Howto validate this html...? Tom HTML 2 05-05-2004 10:33 PM
asp.net creates html that does not validate? sviau ASP .Net 5 02-10-2004 09:08 AM



Advertisments