HOW TO MAKE A SCROLLING TEXT USING HTML AND CSS
Code: _______________________________________________________________ <!DOCTYPE html> <html> <head> <title>Scrolling Text</title> </head> <body> <style> #background001 { background-color: blue; text-align: center; font-size: 125%; color: yellow; } </style> <marquee id="background001" behavior="scroll" direction="up"; scrollamount="2"> Text 01<br /><br /> Text 02<br /><br /> Text 03<br /><br /> Text 04<br /><br /> Text 05<br /><br /> </marquee> </body> </html> If you want to change it from going up to down, change the direction to "down". Same thing with left and right. However, for the left and right, you might want to remove the <br /><br /> and replace them with dots, or spaces by adding   for each space. This way you can have 5 texts on one line. In the next example, I used 4 spaces between each text. <!DOCTYPE html> <html> <head> <title>Scrolling Text</title> </head> <body> <style> #background001 { background-color: blue; text-align: center; font-size: 125%; color: yellow; } </style> <marquee id="background001" behavior="scroll" direction="right"; scrollamount="2"> Text 01     Text 02     Text 03     Text 04     Text 05 </marquee> </body> </html> You can also change the speed of the scrolling by changing the number of scrollamount. I have it under "2". As far as the ID background001 goes, you can rename it anything you want as long as you change the name everywhere else in this code. |
OTHER RELATED PAGES: Learn how to make a quiz Learn how to make a point and click word game Learn how to add an image from your pc to your website Learn how to create a link for your website Learn how to make a multiple choice quiz using javascript arrays Learn how to create an input box using html and javascript |