2021-04-28 16:49:39 +02:00
|
|
|
Even if all browsers are fault-tolerant, HTML tags should be closed to prevent any unexpected behavior.
|
|
|
|
|
2021-04-28 18:08:03 +02:00
|
|
|
|
2021-04-28 16:49:39 +02:00
|
|
|
== Noncompliant Code Example
|
|
|
|
|
|
|
|
----
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Test Page <!-- Noncompliant; title not closed -->
|
|
|
|
<!-- Noncompliant; head not closed -->
|
|
|
|
<body>
|
|
|
|
<em>Emphasized Text <!-- Noncompliant; em not closed -->
|
|
|
|
<!-- Noncompliant; body not closed -->
|
|
|
|
</html>
|
|
|
|
----
|
|
|
|
|
2021-04-28 18:08:03 +02:00
|
|
|
|
2021-04-28 16:49:39 +02:00
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
----
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Test Page</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<em>Emphasized Text</em>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
----
|
2021-04-28 18:08:03 +02:00
|
|
|
|