Home | | Computer Applications 11th std | Scrolling text using Marquee - HTML

Chapter: 11th Computer Applications : Chapter 12 : HTML - Adding multimedia elements and Forms

Scrolling text using Marquee - HTML

In HTML, a piece of text or image can be moved horizontally or vertically by using marquee tag.

Scrolling text using <Marquee>

 

In HTML, a piece of text or image can be moved horizontally or vertically by using <marquee> tag. This feature makes a web page as more attractive.

 

General format:

<marquee> Text or image to be scroll </marquee>

 

Attributes of <marquee>

 

Height and Width

These attributes are used to set height and width of the marquee. The values should be either in pixels or in percentage of browser window.

 

Direction

This is used to specify the direction of the movement of text or image. The text or image will move towards right to left by default. So, the default direction is left. The Possible values are ‘up’, ‘down’, ‘left’ or ‘right’.


Behaviour:

This attribute is used to specify the type of scrolling. The values are ‘scroll’, ‘slide’ and ‘alternate’.

 

Scrolldelay:

This attribute is used to define the time delay between each jump. The time unit should be in seconds.

 

Scrollamount:

This is used to define the speed of the scroll.

 

Loop:

This is for defining how many times the marquee element should repeat on the screen.

The default value is ‘infinite’, which means the marquee element scrolls endlessly.

 

Bgcolor:

This is used to specify the background color to the marquee elements.

 

Hspace and Vspace:

This is for defining the horizontal and vertical space around the marquee. The value can be in pixels or percentage.

 

Illustration 12.4: An HTML code to demonstrate marquee

<html>

<head>

        <title> Marquee </title>

</head>

<body>

        <marquee> <b> The Government of Tamilnadu </b>, Directorate of School Education </marquee>

        <marquee direction=right> Welcome to <b> The State Council of Educational Research and Training </b>, Tamilnadu </marquee>

</body>

</html>

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
11th Computer Applications : Chapter 12 : HTML - Adding multimedia elements and Forms : Scrolling text using Marquee - HTML |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.