Re: Site map?
- From: Guy Macon <http://www.GuyMacon.com/>
- Date: Sat, 04 Oct 2008 21:03:42 +0000
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 & 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
&. 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 " & <
and > 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 © 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 atI will do the forced validation, but I do not recall having any input
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.
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/>
.
- Follow-Ups:
- Re: Site map?
- From: dorayme
- Re: Site map?
- References:
- Re: Site map?
- From: DLU
- Re: Site map?
- From: Guy Macon
- Re: Site map?
- From: DLU
- Re: Site map?
- Prev by Date: Re: Site map?
- Next by Date: Re: Site map?
- Previous by thread: Re: Site map?
- Next by thread: Re: Site map?
- Index(es):
Relevant Pages
|