HTML code warnings in asp.net html code view

  • Thread starter Craig Kenisston
  • Start date
C

Craig Kenisston

Hi,

This is a silly question. I'm relatively new to asp.net and asp at all. But
I always had this doubt.

I'm working with Visual Studio and while exploring the ASPCommerce starter
kit, when I switch from design view to html code view, I see many keywords
underlied, like if they were invalid, however, they're not, they display
fine and the project runs fine.

Example, the next, the "link" keyword is underlied and it popups to : "the
active scheme does not support element link"

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

More, all the margin related attribute, are marked as : Could not find any
attribute "leftmargin" of element body

<body background="images/sitebkgrdnogray.gif" leftmargin="0" topmargin="0"
rightmargin="0"
bottommargin="0" marginheight="0" marginwidth="0">

And so on ....

So, could someone explain, what are all these warnings and where they are
comming from ?


Regards,
 
M

Martin Dechev

Hi,

It's the VS internal html validation, which by default (with no meta header
"vs_targetSchema" in the head) validates against IE 3/NN 3. If you set the
document property targetSchema to Internet Explorer 5 most, if not all, of
these "errors" will disappear.

Greetings
Martin
 
C

Craig Kenisston

Martin :

Thanks, I did it, set it to Internet Explorer 5.0 (the higher option
available there), and in fact it disappeared almost all.
However, these still there warning:

marginheight="0" marginwidth="0"

What does this have as special ?

Regards,
 
M

Martin Dechev

Hi,

These are not in the w3c standards (they are in fact, but apply only for
frame and iframe) and will be ignored by browsers. I prefer setting the
margins of the body of the document using the style attribute:

<body style="margin: 0px;">

or assigning it a css class alternatively.

Greetings
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top