All TalkersCode Topics

Follow TalkersCode On Social Media

devloprr.com - A Social Media Network for developers Join Now ➔

How To Move The Text In HTML

Last Updated : Mar 11, 2024

How To Move The Text In HTML

I this tutorial we will show you the solution of how to move the text in HTML, in HTML there are many ways with the help of which you are able to make a creative website and one from them is move text in html. Moving text in html is seems to be very creative.

Now, there are many ways with the help of which you are able to move text in html.

There are also use of JavaScript and jQuery to move text in html. But, we will show you how you able to move your text using html tags only.

And the name of the tag which we use here is marquee tag.

Step By Step Guide On How To Move The Text In HTML :-

As, we already specify there are many ways with the help of which you are able to move the text in html.

But here we choose the suitable way from every side and with the help of html tags only.

So, in this topic the text will be move using marquee tag. Whereas in marquee tag there are also many attribute which are used which help you to choose direction, means in which direction the text move.

With the help of attributes you can handle the speed of text, scroll amounts and many other things which you understand in our next session.

 <!DOCTYPE html>
 <html lang="en">
 <head>
 <meta charset="UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <title>Document</title>
</head>
<body>
    <marquee> Their is no any direction given to text but it still moves to left </marquee>
    <marquee direction="right"> The text moves in right direction</marquee>
    <marquee direction="down"> the text moves in down direction</marquee>
    <marquee direction="up">the text moves in upper direction</marquee>
</body>
</html>
  1. First, we write <! DOCTYPE html> which we used as an instruction to the web browser about what version of HTML file is written in.
  2. Secondly, the <html> tag is used to indicate the beginning of an HTML document.
  3. As above now <head> tag is used to contain information about web page. In this tag a <title> tag is used which helps us to specify a webpage title.
  4. Both <head> and <title> tags are Paired tags. So, both have </head> and </title> ending tags respectively.
  5. Thirdly, <body> tag is used to define the webpage body. All the contents to show on website are written here.
  6. Hence, here is body we create directly marquee tag, if you want to create this tag under some tag, then you can also do this. After this, in first marquee, you see that there is no any direction given. It means that by default the text moves to left direction.
  7. In next marquees, we found that here we describe some directions, so using that attributes the tags moves in respective direction.
  8. You can also specify the width and height of marquee tags to move them in specific dimensions.
  9. At last, the <body> and <html> tags are closed with </body> and </html> respectively.

Conclusion :-

At last, here you see how to move text in html in any direction. There are many other attribute that are used under marquee, we also show you them. That what are they and how they work. I hope this tutorial on how to move the text in HTML helps you.