Grant Communications LLC provides MA Web Design for clients in MA, NH, FL, MI, CA, CT, RI.
MA Web Design • Internet Marketing • Web Site Design
603-715-5445 for solutions to help your web design in Massachusetts.
  • MA Web Design
  • MA Web Development
  • MA Search Engine Marketing


Web Tips

The following web tips, presented in no particular order, cover a wide range of functions. Some of the tips refer to HTML specifications while others are specifically for Javascript implementation. Be sure to use the appropriate tip in the appropriate way to achieve the desired result.

All annotations will be shown using this color. Do not include the annotations in the web code.

Favorite Icon
Setting a favorite icon in the browser tab
<link REL="SHORTCUT ICON" href="http://www.mysite.ext/logo.ico">
Use a 16 x 16 windows compatible icon and make sure the file exists at the listed URL.

Caching and Refresh
Include metatags in <head> section of the page.
No Cached Page
  <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Refresh Tag
 <meta http-equiv="Refresh" content="20; URL=">
This header tag means jump to "" after 20 second delay. Note the nonstandard quotation syntax which groups the delay and the URL together separated by a semi-colon.

Email Link Tips
Mailto links with subject and message
 <a href=" there&
body=Howsit goin?>Email Me!</a>
When the link is clicked, a message saying "Howsit goin?" is emailed to with the subject "Hey there". The default local email program is used for this task.

Open page and remove frame
<a href="" target=_top>Open page and remove frame</a>

Standard hyperlink syntax is used.

Make sure page is not shown in a frame

<script language="JavaScript">
function breakout() {
if (top.location != location)
   {top.location.href = document.location.href;}
<body onload=Javascript:breakout()";>

Open new window and show page
<a href="" target=_blank>Open new window and display the page</a>Popup window'','popup','toolbar=no,location=no,

Javascript Tips

Javascript Comments

  <script language="Javascript">

  <!-- Start Comment
    All the comments fit to print - multiline comment
  End Comment-->

  // One line comment         

Either or both styles are acceptable.

Javascript Arrays

var arrayname=new Array(10);

Creates an array of 10 elements all named "arrayname". Case is important.

Javascript Text Rollover Color Change and Click-Jump

<script language=Javascript>
  function changein(ptr) {'red';}
  function changeout(ptr) {'black';}
  function go(url) {document.location=url;}

<font onMouseOver="Javascript:changein(this);" onMouseOut="Javascript:changeout(this);" onClick="Javascript:go('');">This is the rollover wording</font>
Changes "This is the rollover wording" text color to red whenever mouse moves over the text. When the mouse leaves the text, color changes back to black. If user clicks on text, the browser jumps to ""

Change Mouse Pointer Appearance
<script language=Javascript>
  function setcursor() {'crosshair';
  function resetcursor() {'default';

<font onMouseOver="Javascript:setcursor();"
Crosshair cursor should be shown here
Change the appearance of the Mouse pointer to reflect a change in context or to generate particular special effects. In the example above, the cursor changes to crosshairs whenever the mouse rests on the text. Moving the mouse off of the text restores the cursor to the default appearance. Various cursor styles are listed below:
  • auto
  • crosshair
  • default
  • e-resize, w-resize, n-resize, s-resize, ne-resize, nw-resize, se-resize, sw-resize
  • help
  • move
  • pointer/hand
  • text
  • wait
External Javascript Inclusion
<script src="externalscript.js" language="Javascript" type="text/javascript"></script>
Includes the Javascript found in file "externalscript.js" at the location of the tag.


Web Page Design





Contact Us for your new Web Design Today!