Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31795
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Replacing javascript line break (\n) with HTML line break (<br/>) |
| Date | 2016-12-11 16:53 +0100 |
| Organization | PointedEars Software (PES) |
| Message-ID | <2816234.AJdgDx1Vlc@PointedEars.de> (permalink) |
| References | <dc07c4cd-7623-42e4-abe0-972601884ec3@googlegroups.com> <XnsA6D16E788D90Eeejj99@194.109.6.166> <HoZ%z.108664$WF4.105232@fx39.am4> <9051694.nUPlyArG6x@PointedEars.de> <30736b1d-b750-45c2-8df3-a22b2ff7bfd4@googlegroups.com> |
rmmjr@rmmillerjr.com wrote: ^^^^^^^^^^^^^^^^^^^^ Please post using your real name. > <br/> is XHTML syntax and must include the trailing backslash to be valid. Utter nonsense. > <br> is the HTML5 itteration of a void element, however it does not > require a trailing backslash for the sake of validity. “/” is a _slash_, _not_ a *back*slash. You should learn the basics of a field before you attempt to lecture others about it. The slash, or more precisely, the character sequence “/>”, is required in an HTML5 document written in the XHTML syntax: <https://www.w3.org/TR/2016/REC-html51-20161101/introduction.html#html-vs-xhtml> It can result in invalid markup in an HTML4 document where, per the HTML 4.01 Specification, “<…/>” is equivalent to “<…>>”. For example, “<meta …/>” would be equivalent to “<meta …>>” in HTML4. “>” would parse as text content “>”, however text content is not allowed on the first nesting level of the HEAD element, where an otherwise valid META element were to be found. And if the result would not be invalid, it could be the unwanted display of a “>” character: Some authors, also through XHTML, have acquired the misconception that elements with SGML content model EMPTY would need to be “closed” this way in HTML, too. As a result, some vendors have modified their HTML parsers to not implement the HTML4 Specification to the letter (there as well) and to simply ignore the slash when in HTML mode; eventually, HTML5, based on WHATWG HTML, which is driven by few browser vendors, has standardized this behavior. However, relying on this parsing behavior in documents written in earlier versions of HTML than 5 is error-prone and should be avoided. <http://dodabo.de/html+css/tests/shorttag.html> -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Replacing javascript line break (\n) with HTML line break (<br/>) justaguy <lichunshen84@gmail.com> - 2016-11-30 19:15 -0800
Re: Replacing javascript line break (\n) with HTML line break (<br/>) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-12-01 10:51 +0100
Re: Replacing javascript line break (\n) with HTML line break (<br/>) justaguy <lichunshen84@gmail.com> - 2016-12-01 05:55 -0800
Re: Replacing javascript line break (\n) with HTML line break (<br/>) justaguy <lichunshen84@gmail.com> - 2016-12-01 05:59 -0800
Re: Replacing javascript line break (\n) with HTML line break (<br/>) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-12-01 16:41 +0100
Re: Replacing javascript line break (\n) with HTML line break (<br/>) Cybercode <lambda@dr.com> - 2016-12-01 17:49 +0000
Re: Replacing javascript line break (\n) with HTML line break (<br/>) justaguy <lichunshen84@gmail.com> - 2016-12-01 13:09 -0800
Re: Replacing javascript line break (\n) with HTML line break (<br/>) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-01 23:13 +0100
Re: Replacing javascript line break (\n) with HTML line break (<br/>) rmmjr@rmmillerjr.com - 2016-12-11 07:10 -0800
Re: Replacing javascript line break (\n) with HTML line break (<br/>) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-11 16:53 +0100
Re: Replacing javascript line break (\n) with HTML line break (<br/>) rmmjr@rmmillerjr.com - 2016-12-11 07:10 -0800
csiph-web