Attractive pages, or How to make a marquee in HTML

Maintaining a balance between attracting visitors' attention and animating the pages of a site is essential. The modern Internet user is quite experienced and follows his specific plans, which fit into certain forms of presentation. It was numerous advertising technologies of developers and website designers that formed an adequate reaction of visitors. This is important to consider. If the plans do not have the goal of creating a truly active site that can individually respond to everyone who visits the page, offering the dialogue that he relies on, it is better not to show excessive zeal in the field of advertising in general and page dynamics in particular.

How to make a creeping line in html

An obsessive animation as an unexpected soundtrack or the sentence “write a phone number and they will call you in a minute” no longer attracts a visitor, and in most cases reduces interest in a resource, while you can draw a creeping line in HTML code to draw attention to the necessary elements site.

JavaScript or HTML

The capabilities of HTML and CSS allow you to quickly get various original effects of moving elements, and you can often do without even simple JavaScript code, since marquee tag allows you to create a creeping line and a crawling image, and without extra costs. Initially, it appeared in Internet Explorer, then it was implemented in other browsers.

How to make creeping line in html

Interest in simple animations has recently diminished, and options for describing how to create a creeping line in HTML are considered a relic of the past. Although it is not known what time it is to relate to history and to oblivion. A different historical relic can be taught to contemporaries in such a way that interest will be higher than from lotions of the most expensive smartphone or the intelligence of a nanorobot.

Tag marquee

The marquee tag allows you to specify up / down movement, from left to right or, conversely, inside the entire page or a single block. There are attributes of color sizes, speed. The developer has a fully functional palette of tools to make the appearance and movement of content on the page meaningful, attractive and unobtrusive. Before you can create a creeping line in HTML, you need to understand that this is primarily the result of the developer’s interest in the visitor, his desire to attract the latter with good content, offered properly. However, the point is not at all in the running lines, but in how the page is executed and its elements are interconnected.

How to create a creeping line in html

The idea of ​​how to make a creeping line in HTML in an unobtrusive way to make a page live comes to the mind of every developer. In this element you can note relevant information, show the movement of stocks, price changes, the appearance of discounts and so on.

Key attributes of Marquee

Marquee offers a not-so-large selection of options that describe how to create a creeping line in HTML:

  • the behavior attribute defines the movement between the sides of the element (alternate);
  • scrolling, in which the content in a circle goes out from one border of the element and goes to another (scroll);
  • you can display words and "stick" them to each other (slide).

The direction of movement is determined by the direction attribute, which allows you to define the movement left-right (left | right) or up-down (up | down).

How to make a running line and a running image

The boundaries of the area in which the content is moved are determined by the width and height attributes, which can be used to specify subtle effects. After all, the idea of how to make a creeping line in HTML is not always the movement of information. You can set very small borders for a single character (for example, "o", "x", "!", ...) and get completely unexpected and attractive compositions of elements without spending a single byte of JavaScript code.

Image Insertion

You can move not only information, but also other elements of HTML markup. You can achieve original effects when moving, for example, * .gif images. Unlike PNG and JPG formats, GIF images can themselves be animated. For example, you can draw a spinning wheel of a car or a drop that changes when it flies to the ground. By setting the horizontal movement of the wheel, which itself rotates, you can create the illusion of movement. Well, four wheels is already a living car without a single line of JavaScript code.

Similarly, you can specify the movement of the drop from top to bottom. While the image "falls", if its change corresponds to the aerodynamics of the process, the desired effect will be achieved with completely insignificant actions.

Using the marquee tag

How to make creeping line in HTML optional means simple and effective? You can come up with interesting options for using non-traditional methods. It is known that changing the colors of characters, background, loading images, manipulating the sizes of elements are allowed on pages in dynamics. This makes it possible to create creeping lines, for example, as a sequence of elements that appear on the screen with varying degrees of transparency, change their size or position on the page.

Hypertext and programming: everything is formally and strictly laid out, but even strict formal constructions do not limit the possibilities for convenient, efficient and dynamic presentation of information.

Source: https://habr.com/ru/post/K367/


All Articles