html - nav element with no heading -- document outline -
this question has document outline structure relates headers within <nav>
element. not question validation.
when validate 1 of pages web app, , check field says "document outline" outline includes this:
[nav element no heading]
i don't want add heading nav element because seem extraneous, consumer of app, in context of nav (it's nav element pagination of sub-section of page); want have structured document outline.
so question multi-part:
- why outline including this?
- what proper way add heading nav element?
- is necessary add heading nav element? because doesn't seem common practice on websites.
this because nav
element defined within sections section of html5 specification , sections expected have headings.
as document outline:
the outline sectioning content element or sectioning root element consists of list of 1 or more potentially nested sections. section container corresponds nodes in original dom tree. each section can have 1 heading associated it, , can contain number of further nested sections.
note word can - aren't required. if required, validator throwing warnings , errors, not somewhat-friendly notes remind heading missing.
so answer questions:
why outline including this?
it's friendly reminder heading isn't present. in case expecting heading present you'd forgotten add one, instance.
what proper way add heading nav element?
that entirely depends on you're wanting achieve. html5 specification gives following example:
<nav> <h1>navigation</h1> <ul>...</ul> </nav>
is necessary add heading
nav
element? because doesn't seem common practice on websites.
not @ all. it's entirely optional. may argue it'd seo purposes add heading sections, that's entirely you. can hide heading css if want add them don't want display them.
This comment has been removed by the author.
ReplyDelete