html-heading

Is [h6 aria-level=“7”] a reliable way to create a [h7] element?

偶尔善良 提交于 2021-02-07 10:53:48
问题 Typically, HTML headings are only able to go up to <h6> before it becomes invalid. As far as I can tell, the following is a completely valid way to create a <h7> element in HTML: <h6 aria-level="7">This is a heading level 7 element</h6> I have tested this in NVDA in Chrome, Firefox and Internet Explorer and it works as intended. I don't really have access to any other screen readers though. Can someone with access to lots of screen reader / browser combinations confirm whether the above is

How can I place two headings next to each other using CSS?

本秂侑毒 提交于 2021-02-04 22:10:48
问题 <h5>Category</h5><h6>auto</h6> places Category and auto on separate lines, like this: Category auto How can I place them both on the same line, like this? Category auto 回答1: h(n) elements are 'block' elements, which means they will grow to take all available horizontal space. This also means they will push anything "right" of them down to the next line. One easy way to accomplish this is to set their display to inline: <style> h5, h6 {display:inline;} </style> Note that inline-block is not

How can I place two headings next to each other using CSS?

风流意气都作罢 提交于 2021-02-04 22:10:03
问题 <h5>Category</h5><h6>auto</h6> places Category and auto on separate lines, like this: Category auto How can I place them both on the same line, like this? Category auto 回答1: h(n) elements are 'block' elements, which means they will grow to take all available horizontal space. This also means they will push anything "right" of them down to the next line. One easy way to accomplish this is to set their display to inline: <style> h5, h6 {display:inline;} </style> Note that inline-block is not

HTML 5 Document Outlining Algorithm

佐手、 提交于 2020-01-11 03:26:04
问题 I am building a new site and I have recently started looking at the Document Outlining Algorithm. It states that all sections should have a header, sections include section , nav , article and body (There are probably some more too). So, I have a couple of navigation areas and my question is; would it be wise to have a heading but just hide it from the browser? 回答1: Every sectioning content element "longs" for a heading element ( h1 - h6 ). But you are not required to provide one. If you don

Add a line next to a header with CSS

巧了我就是萌 提交于 2020-01-05 10:14:27
问题 Is there a way to display a line next to a header using CSS? Here's an image of what I'm talking about: I could do it with a static background image, but that'd require custom CSS for every heading. And I could do some hacky stuff using :after and background colors on the h1 , but it wouldn't look right against a gradient background. I'd like to do this with CSS, not JavaScript. If it doesn't work in older browsers, that's fine. UPDATE: In the past I've done something like this: <h1><span

Add a line next to a header with CSS

≡放荡痞女 提交于 2020-01-05 10:12:31
问题 Is there a way to display a line next to a header using CSS? Here's an image of what I'm talking about: I could do it with a static background image, but that'd require custom CSS for every heading. And I could do some hacky stuff using :after and background colors on the h1 , but it wouldn't look right against a gradient background. I'd like to do this with CSS, not JavaScript. If it doesn't work in older browsers, that's fine. UPDATE: In the past I've done something like this: <h1><span

Is there any purpose for h2-h6 headings in HTML5?

本小妞迷上赌 提交于 2020-01-02 07:43:28
问题 I'm confused with using h1-h6 headings and section in html5. Which of these two examples is correct? <body> <article> <header> <h1>Article heading</h1> <p><time>0/0/00</time></p> <div id="article-tags"></div> </header> <section> <h2>Introduction</h2> <p> ... text ... </p> </section> <section> <h2>The problem itself</h2> <p> ... text ... </p> </section> </article> </body> This seems natural to me, separate article into sections and give them headings according to whole article heading

How do I simplify this header with lines on the side, so that it doesn't need css3 background properties?

二次信任 提交于 2020-01-01 15:07:01
问题 I have a css class for centering a heading, and adding vertically centered lines on either side. Problem is, it uses css3 background properties, and not every browser supports those. So I'd like to simplify this for cross browser compatibility, but am not sure how to do that. Is there a simpler way to achieve this, without the css3 background (and without adding any extra elements or static heights/widths )? demo here .section-heading { display: table; white-space: nowrap; } .section-heading

Removing space between h1 and h2

痴心易碎 提交于 2019-12-19 07:01:29
问题 I have stumbled across a problem that I can not seem to solve in any way, maybe I am using div s in a wrong way? .greeting h1 { font-family: 'Raleway', sans-serif; font-weight: lighter; font-size: 100px; text-align: center } .greeting h2 { font-family: 'Raleway', sans-serif; font-weight: lighter; font-size: 35px; line-height: 0px; text-align: center } <div class="greeting"> <h1>Hi.</h1> <h2>Select a group</h2> </div> This is the outcome: I want to decrease the space between my <h1> and <h2> ,

Proper use of HTML heading tags

我是研究僧i 提交于 2019-12-18 09:06:09
问题 I'm having trouble understanding the proper usage of HTML headings. I'm using books and online resources to self-learn but there are slight discrepancies on how to use them. [1] "Note that the h1 tag is only used once, as the main heading of the page. h2 to h6 , however, can be used as often as desired, but they should always be used in order, as they were intended. For example, an h4 should be a sub-heading of an h3 , which should be a sub-heading of an h2 ." OR [2] "the logical heading