📜 ⬆️ ⬇️

End tag: optional

Task: Tell about the beauty of the absence of closing tags.

Now I read a lot of articles on Habré, in which Habra-authors post their HTML. I want to show how it can be made more beautiful.

It's about the tags:
The bottom line is that these tags do not need to be closed.
')

OPTION

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd" >
< HTML >
< HEAD >
< TITLE > OPTION </ TITLE >
< meta http-equiv ="Content-type" content ="text/html;charset=windows-1251" >
</ HEAD >
< BODY >
< FORM action ="" >
< DIV >
< SELECT multiple size ="4" >
< OPTION selected > 1
< OPTION selected > 2
< OPTION > 3
< OPTION > 4
< OPTION > 5
< OPTION > 6
< OPTION > 7
</ SELECT >
</ DIV >
</ FORM >
</ BODY >

P

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd" >
< HTML >
< HEAD >
< TITLE > P </ TITLE >
< meta http-equiv ="Content-type" content ="text/html;charset=windows-1251" >
</ HEAD >
< BODY >
< DIV >
< P > . . , .
< P > , . , , .
< P > ? , .
</ DIV >
</ BODY >

LI, DT, DD

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd" >
< HTML >
< HEAD >
< TITLE > LI, DT, DD </ TITLE >
< meta http-equiv ="Content-type" content ="text/html;charset=windows-1251" >
</ HEAD >
< BODY >
< DL >
< DT > Linux
< DD > UNIX- , GNU.
< DT > Windows
< DD > (Microsoft).
</ DL >
</ BODY >

TR, TD, TH

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd" >
< HTML >
< HEAD >
< TITLE > TABLE </ TITLE >
< meta http-equiv ="Content-type" content ="text/html;charset=windows-1251" >
</ HEAD >
< BODY >
< TABLE >
< THEAD >
< TR >< TH > < TH >
< TBODY >
< TR >< TD > 1. < TD > 43
< TR >< TD > 2. < TD > 13
< TR >< TD > 3. < TD > 30
< TR >< TD > 4. < TD > 99
< TR >< TD > 5. < TD > 55
< TR >< TD > 6. < TD > 33
</ TABLE >
</ BODY >


* This source code was highlighted with Source Code Highlighter .
As you can see, all these examples are well read. They are compatible with the W3C standard and work correctly in all browsers.

UPD: We have planned holywar X (HT) ML against HTML. Those who wish to participate, read the comments !!! :)

Source: https://habr.com/ru/post/62511/


All Articles