by quickthrower2 · 4y ago · 0 comments
Also that HTML!
<html>
<BASE HREF=http://www.mecklerweb.com/mags/iw/v6n1/feat26.htm>
<TITLE>v6n1 January 1995 Best and Worst</TITLE>
<H1>The Best and Worst of 1994 and
Predictions for '95</H1>
<I>by Eric Berlin</I><P><I>
</I><HR>
...No </P>'s to be found :-)
"2.14.1 Paragraph
<P>
Level 0
The Paragraph element indicates a paragraph. The exact
indentation, leading, etc. of a paragraph is not defined
and may be a function of other tags, style sheets, etc.
Typically, paragraphs are surrounded by a vertical space
of one line or half a line. This is typically not the
case within the Address element and or is never the case
within the Preformatted Text element. With some HTML
user agents, the first line in a paragraph is indented.
Example of use:
<H1>This Heading Precedes the Paragraph</H1>
<P>This is the text of the first paragraph.
<P>This is the text of the second paragraph. Although you
do not need to start paragraphs on new lines, maintaining
this convention facilitates document maintenance.
<P>This is the text of a third paragraph.
"https://datatracker.ietf.org/doc/html/draft-ietf-html-spec-0...
This is still "true". You can't embed a <P> in another <P>. It's special that way.
I've never tried it using JS with just an addChild though, I wonder what would happen...
Even the MDN docs show "hr" examples without closing: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr
Though they prefer to show "p" with closing tags (they mention it's optional though, and auto-close when one of several other tags are found: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p).
HTML was designed to be written by hand as previous generations of typesetting languages. I think this is the main difference from XML, and this was the reason of a war in the 90's about making HTML a sub-set of XML: see XHTML (https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/XHTM...)
br too.
p not closing feels a bit like a MS Word pilcro. In that regard I get it.
Coincidentally, in April of this year, I got an urgent request from someone parsing 1994-era HTML, to change the ancient Racket permissive HTML parser, to support the even more ancient 1994 `p` elements better: https://www.neilvandyke.org/racket/html-parsing/#%28part._.H...
Vaguely related:
https://news.ycombinator.com/item?id=31694849 ("Write HTML Right", ~2 months ago, 205 comments)