m1.r0
KPCKevin Powell - Community
•Created by m1.r0 on 7/19/2023 in #front-end
can I make a reusable html code like a function?
(not really sure how to call it)
let's say that I have a large SVG with a css animation and that I want to use it multiple times inside of my html file (it can't be a php file . . . I know, that would solve it) can I make something like a function or definition of my pseudo code where I will define this chunk of code once, and everytime I need to place it down I will just use that variable/definition instead of copy-pasting it like 20 times?
(I know that I can create pseudo-class in which I can paste this svg via link in the content but I wouldn't be able to controll and animate separate parts of it)
34 replies