Page is a not externally linkable
encyclo - 2:45 am on Nov 25, 2005 (gmt 0)
Check the resulting source code in Firefox and you will see: The browser is showing how it handles broken markup by adding a closing bracket when it encounters a new opening bracket. The page displays as expected. Is good error-handling a bad thing? In the majority of cases I think that error-handling is a vital part of the success of the format: markup is designed to be sloppy, that unknown tags or attributes can't break things. Without wanting to open the With this particular example, however, there is not actually an error which is being corrected - Firefox and Opera are both doing the right thing by displaying the character entity. See: [w3.org...] Try it with a validator:
Try making a mistake such as leaving off a closing bracket on a tag: [b]<body[/b]
<p>text here</p>[b]<body[/b]
><p>text here</p> application/xhtml+xml can of worms, if the error-handling by browsers was deficient then HTML would be nowhere as popular as it is today.
Note. In SGML, it is possible to eliminate the final ";" after a character reference in some cases (e.g., at a line break or immediately before a tag). In other circumstances it may not be eliminated (e.g., in the middle of a word). We strongly suggest using the ";" in all cases to avoid problems with user agents that require this character to be present. &mdash abd &sup are valid SGML entities, so the browser is handling it correctly if it displays the glyph even if leaving off the final semi-colon is very bad practice. You're being caught out by a broken browser if the glyph is not displayed, not the other way round. ;)