Explanation
Attribute: behavior
This sets the background color for marquee path.
It takes values SCROLL or SLIDE or ALTERNATE
Example Code:
<marquee bgcolor=orange width=200 height=20 direction=right behavior=alternate> Moving Text</marquee>
Result:
Attribute: scrollamount
This controls the amount of movement (in pixels) between the successive displays that give the impression of animation.
Example Code:
<marquee bgcolor=orange width=200 height=20 direction=right behavior=alternate scrollamount=5> Moving Text Tag </marquee>
Result with scrollamount as 5:
Result with scrollamount as 50:
Attribute: srolldelay
This controls the delay (in milliseconds) between the successive displays that give the impression of animation.
Example Code:
<marquee bgcolor=orange width=200 height=20 direction=right behavior=alternate scrolldelay=5> Scrolling Text Tag </marquee>
Result with scroll delay as 5:
Result with scroll delay as 500:
Moving Image
Similarly image can be moved. Instead of text in between marquee tags give an image. It will scroll/move
Example Code:
<marquee width=100 height=20> <img src="./test.jpg"> </marquee>
Result: Scrolling Images
This is first column |
This is first column | This is second column |
Table with 2 row 2 col Now we will try to create a table with 2 row and 2 cols each Example Code: <table border=1> <tr> <td> This is 1st row 1st column </td> <td> This is 1st row 2nd column </td> </tr> <tr> <td> This is 2nd row 1st column </td> <td> This is 2nd row 2nd column </td> </tr> </table> Result: The result for above tag will be as
This is 1st row 1st column | This is 1st row 2nd column |
This is 2nd row 1st column | This is 2nd row 2nd column |
Table with color
We can add background color to the table using the attribute "bgcolor".
This attribute can be added in "table"/"tr"/"td" tag.
The color can be set on the whole to table or to rows and column
Example Code:
<table border=1 bgcolor="green">
<tr>
<td>
This is first column
</td>
<td bgcolor="yellow">
This is second column
</td>
</tr>
</table>
Result:
The result for above tag will be as
This is first column | This is second column |
Table with background image
No comments:
Post a Comment