I have the problem that some people want me to have the "latest" web coding, while others want backward compatibility. I need to know how the following changes affect older browsers:

- Adding the closing tags to li list elements.

- Adding the space and slash to the ends of the br, hr, and img tags.

- Replacing the center tag with the CSS equivalent (It seems totally DUMB that they deprecated this tag). I know the text won't be centered on older browsers, but will it affect things in other ways.

The reason I need backward compatibility is that I have several users with older computers, including one user who has MS-DOS due to having an appliction which Windows ruins the timing of.

Dani AI

Generated

Practical summary (relevant to and the older-machine use case)

Most modern/old browsers follow two simple rules: unknown tags are ignored (so nothing catastrophic usually happens) and malformed markup can cause unpredictable rendering. That lines up with and — extremely old browsers (especially 16‑bit IE or very early engines) may simply fail to render complex pages or choke on certain constructs.

Specific notes tied to the points raised in the thread

  • Explicitly closing list items is safe and recommended for clarity and well‑formedness. Omitting them is tolerated by many HTML parsers, but explicit closures help avoid accidental nesting problems in older parsers.
  • The “self‑closing” slash on empty elements matters only when pages are parsed as XML (the XHTML MIME type). If a document is served as HTML, most browsers accept the slash or ignore it; if served as real XHTML (application/xhtml+xml) a single non‑well‑formed tag can make the whole page fail. See the browser parsing differences described by MDN and the XHTML spec (, XHTML 1.0 Recommendation).
  • Replacing the deprecated center element with CSS is the correct modern approach. Browsers that do not support the CSS rules will simply not apply the centering; they rarely break other layout. The real risk is partial or buggy CSS support and quirks-mode behavior — ensure a proper doctype to avoid quirks (Quirks Mode and Standards Mode).

Practical recommendations

  • Favor progressive enhancement: semantic HTML for content first, layered CSS/JS for modern browsers. That gives the best experience for text browsers like Lynx and very old systems.
  • If the host insists on XHTML Strict, ensure pages are well‑formed and validate with the W3C validator (Markup Validator). Serving as text/html is safer for legacy clients; serving as application/xhtml+xml requires perfect XML.
  • For extreme cases (very old clients), a simple text-only version is acceptable — but prefer feature detection or small-file fallbacks to fragile user-agent sniffing. Modern tools like Modernizr can help detect capabilities rather than guessing.

This keeps newer standards where they belong while protecting users on legacy hardware.

Recommended Answers

All 7 Replies

well IE5 16 bit (for win 3.11) doesnt display any sites hardly at all

well good think about html is if browser doesn't recognice a tag it will ignore it, or in worst it will display this tag as part of website. The second thing I seen only with very bad "web developers" which made they own tags, didn't close or close them in wrong place.

center tag don't worie about it, it will work for some time....

for the person with MS-DOS I have no idea, I have only if you willing to buy him new pc :mrgreen:

for the person with MS-DOS I have no idea, I have only if you willing to buy him new pc :mrgreen:

That doesn't solve his problem (and I don't have the money anyway). Instead, I keep finding old computers people are getting rid of for him.

A new computer with Windows means he can't use his time-dependent application. In fact, new computers with MS-DOS can't do it either, because Intel changed the bus timing.

No new computers support read-modify-write I/O in real time, because Windows doesn't support it. This has set back scientific research.

What I need are specific examples of what certain older browsers do wrong.

I know how Lynx behaves, because it is on the MS-DOS computer. But I can't load every browser known into one computer to try it.

One way to get around this would be checking the requesting browser's identification and serving text-only pages for extremely old browsers.

It's a double workload if you have to make every page twice. A better way around would be designing the page so it can be interpretted logically without CSS styling; and making heavy use of CSS for the benefit of newer browsers, and then not serving the stylesheet to older browsers.

Do you want the older browsers to see modern effects? If I was on an 'outdated' system, I'd rather see well organised plain text than a half-styled or messed up page.

Adding the closing tags to closure-implicit HTML markup generally doesn't cause harm; one exception is <BR>, which is a line break whether its <BR> or </BR> even in XHTML.

Have you been having problems with lists being filled with 'doubles' where every other value is empty? If you code your pages with an HTML doctype; it's probably legal to use <LI> without a closure, and the same with <HR> and <IMG>.. With an XHTML doctype, it's certainly not.

Browsers that don't support CSS centering (the same applies for any CSS) wont be negatively affected by it, they'll just render as if the style wasn't applied. The worst thing is browsers that support the CSS halfway or incorrectly...

There is no </br> ending tag. The new tag is <br /> instead of <br>. All self-closing tags must have the slash at the end in the new standards. The space before the slash supposedly allows older browsers to fail gracefully with it.

It's the same way for link, hr, and img.

One problem is that there is no agreement among sources on what proper code is. The previous post indicates that. One book I have shows a unary <li /> tag, instead of the <li> </li> pair.

The problem I have is that some web-grand-masters are demanding that "only the latest code" be allowed on their sites, without allowing that some users want to cater to people using older equipment. Every page must pass XHTML 1.0 strict before they will enable it. I need to know how messed up the site will be to my site users with older equipment if I use such a service.

In my opinion, they shouldn't be allowed to change a standard in a way to make existing code quit running. But they did it anyway.

Every page must pass XHTML 1.0 strict before they will enable it.

That's a bit OTT. XHTML Strict and HTML Strict are exactly as strict as each other, only in different ways. I think people like the X too much.

I bet these people don't even serve their pages as application/xml+html; thus losing a big benefit of XHTML, new stricter parsers that potentially needs less overhead than HTML parsers.

XHTML Strict isn't neccessarily the 'new' browser standard DTD anyway; there'll likely be an up-to-date HTML DTD until all of us are long gone...

You're right about the closure within the <br /> start tag; I don't like that rule; It implies <script> with src instead of body should be closed in the start tag; and I find that screws up on older MSIE browsers (it renders the whole page invisible)... Perhaps I was missing the space =P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.