hmtl
comment 0

What is the Correct Method to Make Linked Header?

This short blog post by Chris Coyier discusses an interesting point about linked header HTML structure. To put header inside anchor link or to put anchor link inside header tag?

Link inside header:

	<h1>
		<a href="#">Header 1</a>
	</h1>

Header inside link (valid structure since HTML5):

	<a href="#">
		<h1>Header 1</h1>
	</a>

Both methods are just fine but turns out majority of web developers still prefer the original and more semantic way of coding HTML with the link sitting inside the header.

Hit the button below to read the entire post and don’t miss the comments section too.

View More

Filed under: HTML

About the Author

Posted by

Sani Halid is a front-end developer at Stampede and is committed to clean and elegant code. Yet another gamer to join the pack, Sani is also the Editor at Constructs where he shares his daily CSS findings and other front-end development goods.

Leave a Reply