Heading tags don't get stored in classes

It seems that it’s impossible to create a class for headings with the tag (h1,h2,h3 etc)

This tag doesn’t get stored in the class.

Hi,

I’m not sure I quite understand what you’re trying to do :thinking:
Would you be so kind to explain your problem step by step?

Best regards,
timmse

Lets say you are creating a footer…

  • Add 4 colums and add a heading to each one of them
  • Create a class .footer-headings
  • Add the class to all 4 headings
  • Change the tag (h1,h2,h3…) for one of the headings while the class is selected

Result: The tag only changes on the heading you are adjusting

Yes, and that is absolutely right. You’re thinking the wrong way around.

The tag doesn’t matter for the class. You can also apply the .footer-headings class to a container, an image or anything else. As soon as you change the properties of the class (color, font size, spacing, …) they will be applied to every element that has this class (unless the properties are overwritten by the ID).

If you want to have h3 headings everywhere in the footer you have to select the h3-tag for each one. If you want to change them later to h4, you have to change them all to h4. The properties of the class (color, font size, etc.) remain, no matter which tag you choose. And if one thing for sure won’t happen: the tags won’t “synchronize” themselves, but the class properties will :smiley:

Best regards,
timmse

1 Like

I’m using classes all the time but somehow I was expecting I could store the h-tag there as well. Would save lots of time if it worked like that. Anyway realized it later that of course a css class can’t hold inside the actual html tag :rofl: