HTML is a static language, marquees can add a certain buzz to a webpage.
This tutorial focuses on:
- What is a marquee?
- The <marquee> tag
- When to use marquees
What is a marquee?
A marquee is a set of text that scrolls across a webpage. You can make marquees scroll vertically, horizontally, as well as alternating back and forth.The <marquee> tag
The <marquee> tag is perhaps one of the most intricate tags in HTML, and rightfully so. While HTML is a static language, the <marquee> tag gives it some movement - literally! This tag creates a moving scroll which travels across a page.
NOTE: The <marquee> tag is not an official part of
the HTML tag set, but it is still supported by some major browsers such
as Internet Explorer and Firefox.
NOTE: Marquees are not very popular on the web, and their usage
is generally not regarded positively. However, it is ok to use a marquee
here and there once in a while.
Example:
<marquee bgcolor="yellow" loop="infinite" direction="up" height="100" width="400" >
Hello, I am a scrolling marquee. Watch me scroll.
</marquee>
Output:
Example 2:
<marquee bgcolor="#e7ffe0" loop="infinite" height="80" width="450" behavior="alternate">
This marquee scrolls in alternate directions.
</marquee>
Output:
When to use marquees
As stated above, marquees should be used rarely. Using marquees will set an impression on your audience. But it all depends on who that audience is. If your general audience are average web users, then they will probably like the marquee and think its 'cool'. If however, your general audience are people who know a thing or two about web development, they may think your skills are outdated and it will make you look much less professional.It is ok to use marquees once in a while (and really, just once in a while) to add a nice scrolling effect. But don't ever make a habit out of it. Even if your general audience is average web users who don't know anything about web development. Keep in mind that it is important not just how a webpage looks, but how it functions. And using the <marquee> tag will actually result in webpages that do not validate with an HTML validator.
No comments:
Post a Comment