H2 comes before h1 in source Is it ok

0 votes
IF i use <h2> for left sidebar heading and use <h1> for main center content area heading then actually in source and and if CSS is disabled , in both condition <h2> comes before <h1>.
Is it ok? or I should not use <h2> for left sidebar headings?
Mar 11, 2022 in Digital Marketing by Kichu
• 19,040 points
2,786 views

1 answer to this question.

0 votes

Semantically, H1 should come before H2 in a document. H2 is a sub-element of H1.
I would suggest you to use the following markup:

<h1><a>Main title of your site</a></h1>
<h2>Sidebar</h2>
    <h3>Sidebar Headline 1</h3>
    <h3>Sidebar Headline 2</h3>
    .... 
<h2>Main content</h2>
    <h3>Headline 1</h3>
    <h3>Headline 2</h3>
    ...

Note: The best way is to have the sidebar after the content in your HTML and use CSS to position it where you want.

answered Mar 12, 2022 by narikkadan
• 63,600 points
0 votes
From browser's point of view, the order of the tags does not matter. However, the order of the h1 and h2 has semantic implications for the structure of your document. So, having them in the correct order does matter.

Also, it depends on what is your focus keyword. You must put your focus keyword in H1
answered Sep 1, 2022 by Logan

edited Mar 5

Related Questions In Digital Marketing

0 votes
0 answers

After 4 days app is still not indexed in Google Play search

I have published my first application (Voice ...READ MORE

Mar 4, 2022 in Digital Marketing by Kichu
• 19,040 points
505 views
0 votes
0 answers

Open graph description meta tag is not working in LinkedIn

LinkedIn is supporting open graph meta tags ...READ MORE

Mar 6, 2022 in Digital Marketing by Kichu
• 19,040 points
1,803 views
0 votes
0 answers

After 4 days app is still not indexed in Google Play search

I have published my first application (Voice ...READ MORE

Mar 6, 2022 in Digital Marketing by Kichu
• 19,040 points
412 views
0 votes
0 answers

Replacing H1 text with a logo image: best method for SEO and accessibility?

i want to link my logo to ...READ MORE

Feb 14, 2022 in Others by Kichu
• 19,040 points
3,061 views
0 votes
1 answer

Replacing H1 text with a logo image: best method for SEO and accessibility?

<h1> <a href="http://edureka.co"> ...READ MORE

answered Feb 21, 2022 in Others by narikkadan
• 63,600 points
2,719 views
0 votes
1 answer

Switching H1 text with a logo image

<h1> <a href="http://edureka.co"> ...READ MORE

answered Feb 27, 2022 in Others by narikkadan
• 63,600 points
882 views
0 votes
0 answers
0 votes
1 answer

Is it bad practice to use spans as "buttons"? W3Schools is doing that

yes to be precise it a bad ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,600 points
742 views
0 votes
0 answers

WP All in one SEO, does it have a database?

I am using wordpress for my website ...READ MORE

Mar 2, 2022 in Digital Marketing by Kichu
• 19,040 points
397 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP