Re: Site map?




Content-Transfer-Encoding: 8Bit


DLU wrote:

Guy Macon <http://www.GuyMacon.com/> wrote:

Line 104 has this code:
<a href="http://www.sierraclubcalifornia.org/elections.html"target="_blank";>Sierra Club California Elections & Endorsements</a>
I would replace the & with &amp; and add a space before
target= using search to find all the places where each happens.

That was fixed also, I did a search for & and replaced all of them with
&amp;. I am not sure why this makes a difference?

While the & is legal, you want to make things as easy as possible
for the user-agent. (I say user-agent rather than browser because
there are things that aren't browsers that read your HTML -- Googlebot,
for example). The following characters have special meanings in
HTML: " & < > and the user-agent has to figure out that this
particular & is followed by a space and thus not one of the ones
that have a special meaning. By always using &quot; &amp; &lt;
and &gt; instead of " & < and > you have fewer things that
can go wrong.

Another way that you can make things as easy as possible for the
user-agent is to only use 7-bit ASCII characters in your HTML.
Right now your server is (correctly) sending this string to the
user-agent: [ Content-Type: text/html; charset=iso-8859-1 ] but
what happens if you change servers or configuration or look at
the page on a local disk and it is served with another character
set? In that case, this one particular part of your webpage...

Amargosa River Project © George Service

....might be hard for the user-agent to handle. If you replace
the © with &copy; your HTML will work in any character set.

(For those who have newsreaders that don't handle high ASCII
well, that's a copyright (C) Between Project and George,
AKA character A9 hex or 169 decimal.)

Here are some useful entity charts:
http://htmlhelp.com/reference/html40/entities/special.html
http://htmlhelp.com/reference/html40/entities/latin1.html
http://htmlhelp.com/reference/html40/entities/symbols.html

Another thing that can improve HTML code is to do the same validation at
http://validator.w3.org/check?uri=http://home.surewest.net/bikesac/bikesac/
but force HTML strict validation, then fix whatever errors you can.
You might, for example, decide to ignore the target="_blank" because
you want to open new windows, and decide to fix the places where you
have a input element that isn't inside a p, h1-h6 or div.


I will do the forced validation, but I do not recall having any input
elements, what are they?

They are in your search box form. (BTW, what is that
[ d:\www\extranet\ca\cnrcc ] doing there? Your visitors
don't have that file on their disks...)

Validating http://home.surewest.net/bikesac/bikesac/
http://validator.w3.org/check?uri=http%3A%2F%2Fhome.surewest.net%2Fbikesac%2Fbikesac%2F
with the DOCTYPE forced to be HTML 4.01 Strict and with Show
Source and Verbose output turned on, I get 8 Errors and 1 warning
that pass the Transitional tests. The warning is simply that
DOCTYPE Override is in effect, and the two "there is no attribute
"TARGET" errors are because strict doesn't allow target="_blank",
so you can ignore those unless you are willing to not open up
new windows.

The other errors are easy to fix. Simply replace this:

<form action="http://www.sierraclub.org/advsearch.asp"; target="_blank" method="post">
<input name="wheretosearch" value="d:\www\extranet\ca\cnrcc" type="hidden">
<img src="search_box.gif" alt="Search" id="searchimg"><br>
<input name="SearchString" size="8" type="text">
<input src="go_1.gif" id="Image1" alt="Find It!" name="Image1" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image1','','http://clubhouse.sierraclub.org/header/go_1.gif',1)" type="image">
</form>

....with this:

<form action="http://www.sierraclub.org/advsearch.asp"; target="_blank" method="post">
<div>
<input name="wheretosearch" value="d:\www\extranet\ca\cnrcc" type="hidden">
<img src="search_box.gif" alt="Search" id="searchimg"><br>
<input name="SearchString" size="8" type="text">
<input src="go_1.gif" id="Image1" alt="Find It!" name="Image1" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image1','','http://clubhouse.sierraclub.org/header/go_1.gif',1)" type="image">
</div>
</form>

....or this:

<form action="http://www.sierraclub.org/advsearch.asp"; target="_blank" method="post">
<p>
<input name="wheretosearch" value="d:\www\extranet\ca\cnrcc" type="hidden">
<img src="search_box.gif" alt="Search" id="searchimg"><br>
<input name="SearchString" size="8" type="text">
<input src="go_1.gif" id="Image1" alt="Find It!" name="Image1" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image1','','http://clubhouse.sierraclub.org/header/go_1.gif',1)" type="image">
</p>
</form>

I usually like <p> better than <div> for such things, but <p>
might mess up your spacing, so try it both ways.

These are minor improvements, but I think they are worth doing.


--
Guy Macon
<http://www.GuyMacon.com/>

.



Relevant Pages

  • Re: W3C validator complains about link URLs
    ... ampersand were a name start character. ... There's additional prose in the HTML recommendation that advises ... much of which makes authoring more XML like (e.g. quoting all ... Part of this would be to always replace & with & ...
    (comp.infosystems.www.authoring.html)
  • Re: CSS width property problem with western european characters
    ... Euorpean character data in some fields. ... Crystal Reports that references CSS styles and an html wrapper I have ... The reason for including the width property in the CSS style ...
    (alt.html)
  • Re: innerHTML problem in IE6
    ... we don't know whether this is supposed to be HTML or XHTML and how it has been served. ... attempt at a character entity. ... In HTML 4.01, "&B" must be parsed as an entity reference, but since no such entity has been defined, we're in the error processing area, and treating "&" as a data character is conventional in browsers in such cases. ...
    (alt.html)
  • Re: editing perl script through TEXTAREA
    ... not converted to the corresponding HTML entity. ... then browsers do strange things with them. ... As the Perl Encode ... character which cannot be represented in the prevailing character ...
    (comp.lang.perl.misc)
  • Re: looking for components seems to trichview
    ... >Other components that permits editing html directly, ... - use same style sheet in different documents ... - setting for all paragraph and character attributes ... - define character attributes not only in character 'style' attached ...
    (borland.public.delphi.thirdpartytools.general)