HTML file Hints and Tips
------------------------------------------------------------------------------
Site News URL
Refering to a newsgroup at a particular site
Example: snews://secnews.netscape.com/netscape.communicator
------------------------------------------------------------------------------
Special Mime Types
text/html Normal HTML document
text/plain Plain old text, not formating (even if HTML)
application/x-msdownload Force browser to save file to disk
------------------------------------------------------------------------------
Breaking up Long HTML lines
You can insert newlines which do not appear as white space in the
final html document by placing them INSIDE html tags.
EG:
will add newlines to the html source but no whitespace will appear
around the image. It is also common practice to CAPITALISE the html tags
and options so they standout from the arguments.
------------------------------------------------------------------------------
Tables with no sapcing
------------------------------------------------------------------------------
Centering a GIF image
To center a GIF image use the
statment to add 4 tabs
infront of the image. Don't use spaces as these can vary in size
depending on the font used by the client or if it is text of not
Example:
{tab}{tab}{tab}{tab}
Alternitively, you can use a special transparent image to do the job.
This has the advantage of being very neat in the html source file as
you do not need to place everything on the one line as you do with
.
------------------------------------------------------------------------------
Centering a whole page!
If you don't mind using frames, here is a cool way to centralize a page
no matter what resolution the surfer is using:-
your alternative (Suggestion, SSI Inclusion page.htm :-)
This would center your page horizontally - obviously the file spacer.htm
would have just a background or bgcolor. You could nest a frameset to
also center the page vertically, or simply make the file page.htm
another frameset to do the same thing.
matthew
------------------------------------------------------------------------------
META elements..
Page Description (to proper describe your page for Search Engines)
Currently only AltaVista and Infoseek use this information but people
who supply the correct keywords are placed at the top of search hits.
Other than the mail links (last two) this is not a good idea for general
pages just major starting pages. The LINK tag for example is understood
by the lynx text only web browser, for automatic reporting of bad links.
Auto Loading the next page (or sound!)
I presume this tells Netscape to download the audio file 20 seconds
after the page has been loaded.
WARNING: If the page is still downloading graphical elements after
twenty seconds has expired, the will be called and the page
layout will be aborted. This has been my experience on the Mac
side.... --- Pacific Ocean Digital
Specify base for all URL's and Images.
The original source of this document, Images and other relative
links will be from this directory and NOT where this file came from!
------------------------------------------------------------------------------
Server Side Include Files (file type)
Files which are Server Side Includes are just text included and may or
may not contain HTML code.
Note however that many HTML checkers such as weblint will object to
this HTML included file as it does not contain the required , ,
tags. Or the including file SSI will be missing certian tags.
I suggest you use a different suffix which makes it plain that this is a
server side include. I used to use ".dat" suffix other posibilities
are ".ssi" (server side include) or ".phtml" (partial HTML).
I myself now prefer .html-incl to make the file type clear.
------------------------------------------------------------------------------
Execute Bit Hack (for server side includes)
The execute bit method of installing Server Side Includes is a HACK and
not to be used!!! It is being depreciated. Instead you sould use...
index.shtml
The .shtml suffix IS THE CONVENSION for both NCSA and Apache Web servers.
Both servers also now have a DirectoryIndex configuration option so that
directory index files can be ".shtml" or ".cgi" files instead of the
normal ".html" format.
EG: in the "srm.conf" server configuration file...
=======8<--------
# DirectoryIndex: Name of the file to use as a pre-written HTML
# directory index. These files are used if a directory is referenced.
DirectoryIndex index.html index.shtml index.cgi
=======8<--------
------------------------------------------------------------------------------