HTMLs Tutorial

HTML Tutorial HTML Tags HTML Basic Tags HTML Attributes HTML Elements HTML Formatting HTML Text Format HTML body tag HTML samp tag HTML script Tag HTML section tag HTML select tag HTML source tag HTML span tag HTML strike tag HTML strong tag HTML style tag HTML sub tag HTML summary tag HTML sup Tag HTML svg tag HTML table tag HTML u tag HTML Headings HTML Paragraphs HTML wbr tag HTML Anchor HTML Image HTML Lists HTML Ordered List HTML Unordered List HTML Form HTML Form input HTML with CSS HTML Layouts HTML References HTML Frames HTML Links Fieldset Tag in HTML Basic HTML Tags Br Tag in HTML Free HTML Templates How to Create a Table in HTML HTML Calendar HTML Card HTML Cellspacing HTML Center Image HTML Checkbox Read-only HTML Cleaner HTML Code for a Tab HTML Comment HTML Compiler HTML Nested Forms HTML Overlay Text on the Image HTML Select Option Default HTML Snake Game HTML Subheader HTML Tab Character dd Tag in HTML How Many HTML Tags are There HTML Align Tag HTML Responsive HTML Tab Code HTML Table Alternate Row Color HTML Table Fix Column Width Contact HTML DL Tag in HTML How to Insert Image in HTML HTML Background Color HTML Dark Mode How to Convert HTML to PNG HTML Data Toggle HTML Email Template HTML Font Color HTML Font Family ID and Class in HTML HTML Tab Space HTML Tab Tag HTML Itemprop HTML Itemscope HTML Form Design HTML Input Only Numbers HTML Textarea HTML to JPG HTML to Markdown Python li Tag in HTML MDN HTML What is the Correct HTML for Making a Hyperlink? What is the Root Element of an HTML Document How to Make a Box in HTML How to Save HTML Files in Notepad How to Align Text in HTML How to Change Font Color in HTML? How to Change Font Size in HTML How to Change Image Size in HTML How to Create a HTML Page How to Create a Link in HTML File? How to Create an HTML File? HR Tag in HTML HTML Base Tag HTML Default Attribute HTML Hyperlink HTML Indent HTML Injection Payloads HTML Input Numbers Only HTML Roadmap HTML Row Height HTML Schedule HTML Space HTML Tab HTML vs HTTP HTML5 API HTML5 Video HTML Collection to Array Text Area in HTML

HTML5 Advance

HTML5 Tutorial HTML5 Tags HTML Button Tag HTML canvas Tag HTML caption Tag HTML City tag HTML Tag HTML5 SVG HTML Event Attribute HTML5 Audio HTML5 Youtube HTML5 Button Tag HTML5 Tags

Misc

How to add JavaScript to HTML How to change font in HTML How to change text color in HTML HTML Date HTML Hide Element HTML Nested Table HTML Reset Button What does HTML stand for? HTML Background Image HTML Tag Div Tag in HTML How to insert Image in HTML How to create a link with no underline in HTML How to insert spacestabs in text using HTMLCSS HTML tag HTML Code HTML Tag HTML Canvas Design a tribute page using HTML and CSS What is a Container tag Font tag in HTML Difference between HTML and DHTML Empty Tag in HTML HTML Button Link Html Line Break Img src HTML Nested List in HTML Placeholder in HTML TD in HTML HTML Space Code HTML Target Attribute HTML Tag Markup Meaning in HTML Border-Collapse in HTML HTML Onclick Online HTML Compiler Convert HTML to PDF HTML Formatter HTML5 - Web Storage HTTP – Responses Container Tag in HTML DL Tag in HTML Horizontal Rule HTML HTML Tab Text Html Table Cell Background Color HTML Table Cell Color HTML Col Width How Many HTML Tags are There Convert String to Unicode Characters in Python HTML Runner HTML Style Attribute HTML Superscript Attribute HTML tabindex Marquee Tag in HTML HTML Dynamic Form HTML side Tag HTML Pattern Attribute HTML q Tag HTML Readonly Base 64 Encoding in HTML Documents Enhancing Data Portability and Security Evo Cam Web Cam HTML Free code camp HTML CSS How to Add a JS File in HTML? How to Add Picture in HTML How to Add the Logo in HTML? How to Add Video in HTML HTML Class Attribute HTML Entities HTML Form Elements HTML Form Templates HTML Marquee Tag HTML Radio Buttons HTML Text box HTML to JSX HTML Tooltip Basic HTML Codes How to Align Image Center in HTML HTML Header Tag HTML Image Tag HTML Next Line

Marquee Tag in HTML

Introduction

Depending on the settings, the HTML <marquee> tag can be used to show text or pictures that scroll vertically or horizontally along your internet page. Although they aren't often utilized, several HTML tags can assist in organizing and showcasing our material. 

One of the key tags added to HTML to enable such scrollable text and graphics on a webpage is the marquee. This article will teach you how to create a polished static website using the Marquee tag and its many characteristics.

The Tag <marquee>

The <marquee> element is an HTML container tag that is used to create text or pictures that may be scrolled from top to bottom or left to right on a webpage. Nevertheless, HTML 5, the most recent version of the language, deprecates this element.

Syntax:

<marquee> ... </marquee>

Features 

The marquee element in HTML takes the following characteristics in addition to global ones.

  • Behaviour: This specifies the kind of scrolling that occurs in an HTML marquee tag and accepts values for sliding, alternating, and scrolling.
  • Direction: In HTML, direction specifies the scrolling direction in which the marquee tag moves the values left, right, up, and down.
  • Height: This property determines a marquee's height or length and accepts values in pixels or percent (%).
  • Loop: specifies the number of times the marquee will repeat. By default, the marquee's value is infinite, meaning that it will continuously loop and accept numbers as values.
  • Scrolldelay: This parameter, which accepts values in seconds, determines the interval between each leap.
  • Scrollamount: this specifies the jump distance and accepts numerical values.
  • Width: This parameter, which accepts numerical values, indicates the width or breadth of a marquee.
  • vspace: It accepts values in pixels and defines the vertical space surrounding the marquee.
  • hspace: this determines the marquee's horizontal space and accepts values in pixels.

Example

<html>

   <head>

      <title>Example for HTML marquee Tag</title>

   </head>

   <body>

      <marquee> It moves form left to right</marquee>

      <marquee direction = "down">It moves from top to bottom</marquee>

   </body>

</html>

Output

Marquee Tag in HTML Marquee Tag in HTML

An explanation of the above example

Since the first marquee tag in the HTML page in the example above isn't given any attributes, the text placed inside it will automatically scroll endlessly from right to left.

The text within the second marquee element in the HTML page will read from top to bottom since it has been assigned the attribute direction with a down-value.

The <pre> Tag

Preformatted text in HTML is defined by the <pre> tag. The content enclosed in the <pre> tag will be shown precisely as typed within the <pre> tag in HTML because the text item included in the <pre> tag is formatted in a fixed-width font, and the spaces and line breaks are retained in the text.

Syntax

<pre> ... </pre>

Attributes 

In HTML, the pre tag can only take global attributes.

Note: All HTML elements share global attributes, which can be applied to any element.

Example

<html>

<body>

<pre>

Here is an example of a pre

tag, because

                we can see

           that 

              the 

words have no structure at all.             

</pre>

</body>

</html>

Output

Marquee Tag in HTML

An explanation of the example

In the example above, the content contained within the HTML document's pre tag is shown exactly as it was typed.

The <i> tag

The HTML I element shows text in italicized format. HTML highlights content contained within an i element in an HTML document.

Note: The <em> element is often favoured over the i tag in the HTML document in the more recent versions of HTML.favored

Syntax

<i> ... </i>

Attributes

Only global attributes are accepted.

Example

<html>

<body>

<p> Example of i tag in HTML <i>italic style</i>. </p>

</body>

</html>

Output

Marquee Tag in HTML

An explanation of the example

In the example above, the content included in an HTML i tag is highlighted inside the web page.

The <figure> tag

HTML code listings, diagrams, and images may all be stored using the figure tag. Items with embedded content are kept there. For instance, in an HTML figure element, we may contain a <picture> and a <figcaption>, and the web document will treat them as a single entity.

Note: Although the figure tag's content in an HTML page is connected to the main flow, its position is separate from it, and its removal does not affect the document's overall flow.

Syntax

<figure> ... </figure>

Attributes 

In HTML, the figure tag only takes in global attributes.

Example

<html>

<body>

<figure>

<img src="Flower.jpg">

<figcaption> Example for figure tag </figcaption>

</figure>

</body>

</html>

Output

Marquee Tag in HTML

An explanation of the example

In the example above, the <figure> tag in the HTML page stores the image of the flower and its caption as a single object.

The <progress> tag

In HTML, the progress tag indicates when the tag's progress is complete. On the webpage, it appears as a progress bar.

Syntax

<progress />

Note: It is a self-closing tag.

Attributes

The HTML progress tag accepts the following attributes in addition to global ones:

  • Max: indicates the progress bar's maximum value. It is a number with floating points that accept positive values.
  • Value: indicates the extent to which a task has been finished. This floating-point number accepts values from 0 to the maximum value.

Example

<html>

   <body>   

      <h1>Movie progress : </h1>

      <progress value = "6" max = "20"/>

   </body>

</html>

Output

Marquee Tag in HTML

Explanation of the example: In the above example, the progress tag in the HTML document is passed the value = 6 and max = 20. Thus, the progress would be 3.33%, which is shown in the progress bar.

Limitations And Considerations

It is imperative to acknowledge that the <marquee> element is not a conventional HTML element, and its usage in contemporary web design is not advised.

While many browsers still support it for backward compatibility, its use is discouraged in favour of CSS animations and other more commonly acknowledged and controllable approaches.

Drawbacks of HTML Marquee

  1. Because human eyes are drawn to movement and marquee lettering, marquees may be disturbing.
  2. Depending on the scrolling pace, clicking static text becomes more challenging since marquee text moves.
  3. This HTML element is not typical.
  4. It makes the content more difficult to understand and pulls the user's attention.