0

enter image description hereI find using specific H1 - H6 is confining since different pages may need a different size H1 and so on. Also instead of making 2 sets for desktop and mobile this would work as one file. Does anyone work like this and use something similar in handoff?

1
  • 1
    What exactly is your UX problem? You say you want to use alternatives to H1-H6, but you don't really explain what the problems with H1-H6 are.
    – JohnGB
    Commented Apr 15, 2023 at 1:03

3 Answers 3

0

I agree. I think it creates confusion, if we talk about styles using html tag terms h1-h6. Not every h1 should be bold and big. Depends on the page content

0

If this is for web or mobile, then it's essential for SEO and accessibility. Additionally, you shouldn't use it for styling. For more information, see MDN's documentation on heading elements.

However, the usual workaround for this is to define an H1 for the home page and then a different H1 for inner pages. The same applies to all H2 to H6 styles, of course, I mention h1 as an example.

On a side note, I've rarely seen an H6 actually being used, except when it was used for... styling.

-2

I happen to agree with the poster. I think the problem that we are mixing hierarchy with size, and you quickly come across a problem if you want to use a large size but not use an h1 for example. I try to think more on a component level, and think of the h1 of the component. I think ChatGPT says it better:

"Don't use H1-H6 tags for styling: Avoid using H1-H6 tags solely for styling purposes, such as to increase the size of text. Use CSS to style the text instead."

2
  • 1
    (a) Most of us don't seem to like ChatGPT in answers, for a lot of reasons; (b) One of the ways to use CSS is to use it with tags, such as h1 - h6 - i.e., so that h1 tags style a particular way. Commented May 10, 2023 at 17:33
  • ChatGPT or not, this answer is correct, not sure why it was downvoted (well, i guess because instead of using proper docs it's ChatGPT)
    – Devin
    Commented May 23 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.