Link to home
Start Free TrialLog in
Avatar of Robert Granlund
Robert GranlundFlag for United States of America

asked on

CSS H-Tags Syntax

What is a better practice, the H-Tag inside of the link or the Link inside of the H-Tag?
SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Robert Granlund

ASKER

@all;
What about the H-Tag order and the proper way, semantic order;
<h1></h1>
   <h2></h2>

<h2></h2>
   <h3></h3>
   <h3></h3>

<h2></h2>
   <h3></h3>
   <h3></h3>
      <h4></h4>
      <h4></h4>

<h2></h2>
   <h3></h3>
   <h3></h3>
      <h4></h4>
      <h4></h4>

Is that order ok?
Yes. This is correct. So long as children have higher H{number} tags, you're good.

When in doubt, use the Validator above.

In fact, if you click the outline option, you can see an outline of your entire page, to get a quick overview of your page semantics.

Very handy, when you're targeting Featured Snippets showing up in searches for your pages.
I'm sure this is just an oversight by David, but he's suggested his own answer alongside the Authors as being correct. I'm sure if he reviewed the responses, I'm sure he'll realise he intended to accept his own alongside mine (#42396233) as being correct