+ 2

Challenge question: SVG cannot be animated using HTML tags

Why is the answer to that question false instead of true? The accepted answer looks very wrong to me. The svg tag and an animation within it can be nested within an HTML document but that's not what the question is asking. What HTML(not SVG) tag can be used to animate SVG? Don't say "animate" since that is SVG and not an HTML tag. Can you share a working example?

29th Jul 2021, 4:55 PM
Josh Greig
Josh Greig - avatar
7 Réponses
+ 2
Old method would be as simple as <marquee><svg ..... </svg></marquee>
29th Jul 2021, 7:27 PM
BroFar
BroFar - avatar
+ 3
Josh Greig you read the question as a question but it is a statement SVG can not be animated using html tags The answer is false as a statement SVG can be animated using html tags and CSS. Hope this clarified your question.
29th Jul 2021, 5:54 PM
BroFar
BroFar - avatar
+ 1
Give an example of SVG being animated with HTML tags(not SVG tags). The challenge statement or whatever didn't mention CSS so don't use CSS in your example. If "SVG can not be animated using HTML tags" is a false statement, the true statement must be "SVG can be animated using HTML tags." Can you give an example of SVG being animated using HTML tags?
29th Jul 2021, 6:16 PM
Josh Greig
Josh Greig - avatar
+ 1
Thanks. marquee is better than anything I could think of. Since marquee is so deprecated and discouraged, I think the challenge statement should be improved but thanks.
29th Jul 2021, 7:32 PM
Josh Greig
Josh Greig - avatar
0
Josh Greig the question also did not mention attributes or events or rather we are talking html4 or html5 .. It did not mention JavaScript or jQuery none the less the question is rather or not SVG can or cannot be animated using html tags. Oh btw it didn't mention using other xml tags as well.
29th Jul 2021, 7:09 PM
BroFar
BroFar - avatar
0
BroFar, if you think the answer of "false" is correct, can you share an example that shows "SVG can be animated using HTML tags." ? If you animated some SVG elements using CSS, you'd show that it can be animated using CSS. You would not be showing that you can animate using HTML. Likewise if you animated using JavaScript, you'd be showing that instead of HTML.
29th Jul 2021, 7:13 PM
Josh Greig
Josh Greig - avatar
0
Josh Greig I understand what you were getting at and when SoloLearn started html4 was still somewhat current but depreciating out. In place of attributes of behavior html5 jumped to the css / style attribute .. and allowed much more behavior.
29th Jul 2021, 7:37 PM
BroFar
BroFar - avatar