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?
Web DevelopmentCSS* syntax

Avatar of undefined
Last Comment
Chris Stanyon
SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
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?
Avatar of David Favor
David Favor
Flag of United States of America image

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.
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Web Development
Web Development

Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.

77K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo