E
E
Eugene Ordinary2018-07-10 10:02:58
css
Eugene Ordinary, 2018-07-10 10:02:58

Is it possible to specify the name of a class in html tags, which is not defined?

Is it possible to specify the name of a class in html tags, which is not defined anywhere? For example, for js purposes. How normal and valid is this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Gleb Starkov, 2018-07-10
@colonel

For js purposes, this is how it is done.

V
Vlad Nevlad, 2018-07-10
@vladnevlad

of course it's ok. do not hang IDs :)

H
Heorhii, 2018-07-10
@deasmont

Some do this, incl. Me too, albeit rarely. In the designation, for example, that in the next class, a carousel is placed, and in case of edits, immediately finish it. Of course, you can also comment, but there will be too many of them. If the landing page, html can be compressed, comments are useless there. Well, as the person above pointed out, for js, at least it’s more customary for him to use an identifier. It's a matter of taste and whichever suits you best.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question