R
R
Ruslan Tulenov2014-04-15 15:03:53
HTML
Ruslan Tulenov, 2014-04-15 15:03:53

HTML: Is it legal to put a DIV in the A tag?

Assuming the A tag has display:block.
doctype -> !DOCTYPE HTML

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael Danilov, 2014-04-16
@Ryss

The W3C Markup Validation Service

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <a href="#"><div></div></a>
</body>
</html>

Result : Passed, 2 warning(s).
1. Experimental HTML5 validation is used.
2. Due to direct input, it is assumed that the encoding is UTF-8.

R
Ruslan Tulenov, 2014-04-16
@Ryss

Thank you!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question