Довідка:Lint errors/missing-end-tag
Помилка missing-end-tag виникає тоді, коли <тег>
відкрито, але не закрито. Щоб усунути її, закрийте відкритий тег.
Приклад 1:
<span> rabbits
У прикладі 1 span потрібно закрити, додавши </span>
в кінці.
Приклад 2:
<span>Foo
baz
</span>
Приклад 3:
<span>foo
<p>bar</p>
boo
</span>
<span> rabbits</span>
Examples 2 and 3 not only causes the missing end linter warning but also the stripped tag warning. Solutions for 2 and 3 depend on the exact required output. The simplest is to change the <span>
into a <div>
.
The confusing message is a result of <p>...</p>
tags being automatically generated by the parser for each paragraph of text.
Example 4:
''rabbits
In example 4, the HTML tag is a result of parsing wikitext syntax for italics.
It needs to be closed by adding ''
at the end.
Tools
The following tools can help fix missing end tags:
Missing end tags may be reported by WPCleaner as part of CheckWiki error #532 (for tags) and error #540 (for bold and italic formatting).