+ 3
Can we place a h1 title in a <a>
My question is simple: can I place a <h1> in a <a>? Thanks for your answers!
5 Answers
+ 4
Yes.
This code validates in the W3C HTML Validator (https://validator.w3.org/nu/#textarea)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
</head>
<body>
<a><h1>Fred</h1></a>
</body>
</html>
+ 9
Yes,
<a href="www.sololearn.com"><h1>SoloLearn</h1></a> is completely valid.
+ 9
Happy to help Romain Puech .
+ 4
You're welcome âș Happy coding.
+ 3
Thank you so much for your answers !