Sunday, March 06, 2005

Stupid HTML tricks

I just learned about two more attributes/parameters/properties for the anchor tag. While browsing at Bertucci's website I noticed these cool rollover titles (sometimes called tool tips) for the buttons on the page. After inspecting the code of the page I found that these could be made using the title property of the anchor tag. I also saw in the code that there was an accesskey property that allows a user to hit a shortcut key instead of clicking the link (on a mac, hold down control and press the hot key, on windows, hold down alt, press the hot key and press enter). Another property that I already liked to use is the target property. When set to "_blank" this property opens the link in a new window. These properties are entered into the anchor tag in the same way the href property. In other words, the following could appear in an anchor tag:

href="" title="yummy cookies" accesskey="c"

In this case the link goes to the Nabisco website, has the tooltip (rollover title) of "yummy cookies" and can be opened by holding down control + c on a mac, but it does not open in a new window. Not all browsers support the accesskey property.

Here is a link with these properties (the access key is "s"):

NYIT's Solar Decathlon page

In other news, my back hurts too much to go to the lab so I think I will just work on my Flash midterm at home, if I can stop being distracted and sidetracked by interesting HTML that I come across.

{now playing: Sigur Rós - Ágætis Byrjun}


Post a Comment

<< Home