A: Consensus on this area among professional web designers is that they shouldn't be used at all. There are strong arguments arguments towards this, from usability, accessibility, optimisation and standards comformance perspectives. Before I tell you how to use them, please read through this list first...
Something not often mentioned but one of the most important
several layers of usability features. E.g:
- The link does in most cases only work when simply clicked, it
generally no longer works:
* When bookmarked
* When users chose 'open in new window' or 'open in new tab'
* When users to copy the link to clipboard for offline referencing
- Browsers that handle internal and external links different no longer
knows what kind of link it is
Of course, it's a question whether some users are able to use the
resource at all...
many corporate environments
- The link does no longer work in browsers that fail at supporting
There are different kinds of optimisations, but some common ones are
size and search engine optimisations.
by search engines.
- SCRIPT bodies in the HEAD or early in the BODY are generally
severely downgrading the relevancy of your page for any search terms
appropriate for the content, in the views of the search engines.
- If embedded in the page, the script adds to the size of the page
that the user has to download. That means that you have to pay for
larger data transfer ratios, and the user has to wait longer for the
page to download
- Scripts that are scattered through the site take more time to
upgrade and more work to maintain than if you instead moved all
scripting to separate files, leaving the HTML scriptless.
- Standards conformance:
There are a lot of web standards that you can have a look at. There's
also a level of conformance that could be called conforming to the
spirit of standards, as opposed to just the word of them.
- There are no specific security or semantics formally defined for the
- In the spirit of the semantic web, behavior as provided by scripting
should not be part of the document structure and/or content unless the
behavior can be considered to be the actual content provided
In other words, the best way to use them is to not use them. Anyway, for those of you that aren't convinced, here's how they work:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML4.01//EN">