How can I add custom HTML elements for labeling and retrieve their values?

I’ve created an HTML project because I needed full control over how each sample is displayed to my annotators. Since I couldn’t find the right ontology for labeling each sample, I was considering adding custom elements to my HTML—like a dynamic dropdown list that changes its values based on the sample.

My question is: Is there a way to include these elements in the HTML and retrieve their values? Essentially, this element isn’t a predefined feature or ontology, so I’m wondering if this is even possible.

I would need to test it out, given the value should be stored within the HTML file, updating it means modifying the asset (outside the feature the export would not be useful) this would means a server-side storage (basically you need an API that calls upon the change to be stored).
It’s not trivial to implement.