rspec/rules/S1458/html/rule.adoc

31 lines
538 B
Plaintext
Raw Normal View History

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 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 16:49:39 +02:00
== Compliant Solution
----
<html>
<head>
<title>Test Page</title>
</head>
<body>
<em>Emphasized Text</em>
</body>
</html>
----