Should we try to use all H1-H6 on the website?

Should we use all H1-H6 on the website?

I usually use h1 - h2. Now how to judge and decide where to use H3 for h6.

should be used like this:

h3 {display:inline} <div id="content"> <h3> some text in bold:</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h3> some text in bold:</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> </div> 

or

 span {font-weight:bold} <div id="content"> <p><span> some text in bold:</span> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p><span> some text in bold:</span> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> </div> 

to get lke this result

alt text http://easycaptures.com/fs/uploaded/226/1452064646.png

Both W3C methods are valid, with css can I get the same look from both methods, so is it semantic and accessible?

+6
css accessibility xhtml
source share
8 answers

If the text works as the heading level under level H2, it will be H3. Rinse / repeat for H4-H6.

XHTML is semantic - use tags based on what they mean. They look like your choice, including whether they appear as block elements or inline.

+17
source share

The title is the title for the page section. He describes this section in a few words.

There is no simple rule for development if the highlighted bit of bold text in a document is best marked as a heading.

In the above example, it is especially difficult to determine if bold text should be a heading, because the text is meaningless placeholder text. "Semantic" simply means "meaning." The "most semantic" markup is the one that best conveys the meaning of the page. Since the placeholder text does not make sense, you cannot choose how to mark it.

One way to decide if any text should be marked as a headline is to imagine what the document would look like if the user could only see its outlines created from its headings. For example.

  • <h1>
    • <h2>
      • <h3>
      • <h3>
    • <h2>
      • <h3>
        • <h4>
    • <h2>
      • <h3>

Will the text make sense in the outline? Or is it not really a headline, but instead just bold because the designer wanted to emphasize it?

+5
source share

When writing pages, I try to think of it as writing a book if the content is connected to the parent section in such a way as to deserve its section, and then use H3, H4 ... otherwise you can use other html tags such as dd (definition list ) or ul (unordered list).

Of course, if you are going to use SEO, then always use h1 and h2 for the main content headings (or just for the information you want to find for the user). And then, as previously said, you need to try to make him feel like a book (publication).

+3
source share

You use them as you need, just like with any other tag (outside the required tags: html , head , etc.) Use them when you need them, but use them correctly.

+1
source share

It should be noted that search engines such as Google use heading tags (H1) when processing pages to index and rank pages, etc.

See How Google Uses HTML Tags to Improve the Search Engine?

+1
source share

HTML is a markup language that makes semantic content easier to use. CSS is designed to style your content, i.e. the visual part. Just as <p> means that the text block is the paragraph <Hn> , means that the text block is the heading.

The headings describe the structure of your document, a tree-like data structure, if you like.

The web developer extension for Firefox has a nice feature that allows you to see your marked document structure. You can find it in the section "Information →".

+1
source share

In terms of accessibility, do not use multiple header levels unless this affects your content structure. For example, the main document should have a heading of the first level, the main sections in the document should have a heading of level two, and the subsections should have a heading level of three. Wikipedia does a good job of this, for an example see the following link, which has both sections and subsections. http://en.wikipedia.org/wiki/Database_normalization

+1
source share

If you intend to use the content as a subsection (i.e. a separate division, not just a paragraph block) of the section you are in, use the next available header level. Otherwise, just paste it in the paragraph. If absolutely necessary, avoid wrapping your elements in a div tag just for the sake of having a div tag. It is not semantic and can drop search engine spiders.

0
source share

All Articles