What HTML elements should I use here and what markup order?
Here's what I have so far but really not sure what to go with:
7 Replies
Looks good to me
Oh you did make a post 😂 as I said in main channel, you will want to use <header> if you want reader modes to work faik. You can use hgroup inside header too for what ever reason if you needed to wrap them farther.
Came across this issue on joyofcodes site, where he was only using hgroup and reader modes where not picking them up as articles
Could be dependant on being around just the h1 though too 🤔 ....double checked my PR I sent him.
As far as I know the
header
is only landmark when not nested, that is when header
is the header for the document. Nice comparison on link below.Correct but this isn't about being a landmark
I'm specifically talking about reading immersive modes for like edge,FF, Safari
You can absolutely use <header, footer>s in main, section, articles
Oh, yes. Just read "reader" as in assitive tech
Yea fair I was not specific enough
Yea so it only matters for the H1 it seems
So in Zachs case I don't think it would matter but would have to test. Long as he has a <main> > <h1> it would allow immersive* reader mode and follow heading levels down
i tend to use <header> and then <hgroup> if I needed another wrapper around just the heading/tagline but wanted other things in the <header>