HTML Marquee : Learn Marquee Tag in HTML

Eitworld
2 min readMar 8, 2018

--

HTML Marquee:

Marquee Tag in HTML is used for moving text or image on the webpage. It can be move horizontally and vertically according the need and wish of the programmer.

HTML Marquee Tag moves left to right by default and this tag is supported by almost all browsers. The example is as follows:

<marquee> Hello World </marquee>

The basic example of the HTML Marquee Tag is as follows:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=”http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859–1" />

<title>marquee example</title>

</head>

<body>

<marquee>Hello World</marquee>

</body>

</html>

The output of this program is as follows:

The other example of Marquee Tag in HTML for changing the direction of the text is as follows:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=”http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859–1" />

<title>marquee example</title>

</head>

<body>

<marquee direction=”down”>Hello World</marquee>

</body>

</html>

The output for down direction is as follows:

The other example for up direction of HTML Marquee Tag is as follows:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=”http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859–1" />

<title>marquee example</title>

</head>

<body>

<marquee direction=”up”>Hello World</marquee>

</body>

</html>

The output for up direction is as follows:

The other example for slide of marquee tag is as follows:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=”http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859–1" />

<title>marquee example</title>

</head>

<body>

<marquee behavior=”slide”>Hello World</marquee>

</body>

</html>

The slide output for marquee tag is as follows:

When it reaches end of screen then it stops there as follows:

For more information visit: http://www.eitworld.com/html-tutorial/html-marquee.php

--

--