HTML coding defaults in Frontpage 2002

A

anon

Hi there.

I'm trying to "clean up" a couple of websites I created... originally used
FP2000, but am now using FP2002.

I have been using the Mark up Validation services at http://validator.w3.org/
and invariably my pages fail the test and I have to go back page by page
cleaning up the html coding to make the sites compliant.

I'm finding that among other issues, the default settings regarding height and
width (etc.) in Frontpage are written as (for example) height="25" rather than
the needed height=25px.

I'm getting weary using the find/replace tool on the HTML view pages. My eyes
are killin' me!

Is there anyway I can work around this? Do I have to keep digging through the
pages one by one? Can I change the defaults for the HTML creation???

Thanks alot.
Anon
 
R

Ronx

My interpretation of http://www.w3.org/TR/html4/sgml/dtd.html#Pixels
is that widths and heights for images should NOT be expressed with px.
<img width="26" is perfectly valid, whereas <img width="26px" is not
valid.
The same applies to Tables and Divs, as in this example from
http://www.w3.org/TR/html4/struct/tables.html#edef-TABLE

<TABLE width="200">
<COLGROUP span="10" width="15">
<COLGROUP width="*">
<COL id="penultimate-column">
<COL id="last-column">
<THEAD>
<TR><TD> ...
....rows...
</TABLE>

Which HTML elements using height and width are you referring to?
 
A

anon

Hi Ron,

Thanks for the reply.

One of the sites I'm trying to clean up is : www.jeannewhitney.com

I am getting error messages similar to the following on most of my
pages...(along with other errors that I think were MY problem and nothing to do
with FP itself.

"Line 23, column 76: there is no attribute "HEIGHT"

...."0" width="100%" cellpadding="15" height="400">

You have used the attribute named above in your document, but the document type
you are using does not support that attribute for this element. This error is
often caused by incorrect use of the "Strict" document type with a document that
uses frames (e.g. you must use the "Transitional" document type to get the
"target" attribute), or by using vendor proprietary extensions such as
"marginheight" (this is usually fixed by using CSS to achieve the desired effect
instead).

This error may also result if the element itself is not supported in the
document type you are using, as an undefined element will have no supported
attributes; in this case, see the element-undefined error message for further
information.

How to fix: check the spelling and case of the element and attribute, (Remember
XHTML is all lower-case) and/or check that they are both allowed in the chosen
document type, and/or use CSS instead of this attribute."

I used a Microsoft Theme to create the website originally, and back then I did
not understand CSS at all. I'm catching on to CSS (finally), but have not
removed the theme from the site & switched over to full CSS (plan to do that
when I get the time and can figure it out).

So, anyway, if I add a doctype to the page & define the doctype as
"transitional", then the page won't validate due to the presence of the
Microsoft Theme (doesn't seem to recognize that). Urgh!!!

So...in summary...I'm confused. How important is it that my pages validate
anyway??? (They seem to look ok in Internet Explorer and in Firefox.)

Thanks again,
Anon
 
R

Ronx

Validation helps, but is not important. If you use a theme, the page is
unlikely to validate if applied using HTML elements and attributes. If the
pages look OK in IE *and* Firefox, they will look OK in almost any browser -
and users do not check for valid HTML.

The code snippet you provided appears to be from a <table> declaration.
Table Height is not valid - tables do not have a specified height - they
accommodate the rows inside them.

Another area this page will fail validation with a !doctype, is the
Navigation Bar. The <nobr> tag is illegal HTML in HTML4 - but FrontPage
uses it anyway. The CSS whitespace equivalent to <nobr> was not well
supported in browsers until recently, several years after the <nobr> tag was
made illegal. There are circumstances where validation *has* to be ignored.

IMO, use a !Doctype, use CSS, use validation to help clean up the code, but
do not allow validation to take control of the page. Validation as a tool
is good, validation for the sake of validation is pointless.
 
A

anon

Thanks again for your advice!

One last thing...if I define the doctype as "transitional" but it does not
completely validate (due to the nav. bar and other theme elements), will the
pages be better coded? I guess what I'm really asking is how important it is to
declare the doctype. Do search engine spiders look for doctype? What is the
importance of it if FrontPage doesn't automatically create it for sites designed
using the program?
 
R

Ronx

The !doctype affects the way the page is rendered. With an incomplete or no
doctype, the page will be rendered in Quirks Mode. See
http://msdn.microsoft.com/library/d...c_fp2003_ta/html/odc_fpWorkingWithDocType.asp
for details.

For consistency between browsers, I recommend using the !doctype.

Validating the page with a !doctype in place will show up errors (some of
which you may wish to leave in place) in the HTML, and you *may* end up with
better code. But that depends on how you interpret the reported errors, and
how you fix them.

Search Engines do not look for a doctype.
 

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

Top