Forum Academy Marketplace Showcase Pricing Features

How to change font using element ID

Hi,

I am building an app where I would like to allow my users to pick their own fonts. Currently, I am managing that using conditions, but I am looking for a more efficient way.

How can we change the font of a text dynamically using HTML and the element Id of the text we want to change?

Hey there @maxime1,

You can probably write some code that looks something like this:

Id you’re setting: test

#test {
font-family: Open Sans;
}