[RESOLVED] HTML 5 and character codes
Why is it necessary to code the following characters in HTML 5? They both display correctly in all the major browsers without the code. Is it just to satisfy W3C Validation?
Don't look at this as simply what works. Look at it in terms of best practice. HTML entities are really necessary in a couple of instances (like query strings), but browsers will always try to render whatever you put on a page.
So you can often get away with very sloppy code until the situation arises when it actually starts to cause a problem. By always sticking to the standards, you insure that all users see your pages the way you intend, and automated systems (like in blog templates or when search engine robots crawl your site) won't have any trouble with them either. A little extra effort up front can save you a lot of trouble in the future.
I guess I wouldn't say that currently it's necessary, but only because all modern browsers still support older versions/specs of HTML. It's the same with a number of other deprecated tags and attributes that still work.
It's more about following the standards of the most recent version of HTML. Eventually browsers will start removing support for older things and thus sites that use them will run into some issues (like looking at sites from the 90s today).
"Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"
Thanks for clarification. What prompted my inquiry is remote ad code for advertising networks like 7Search and Chitika. They do not follow standards. In fact, some still use "script type" and "script language," as well as the ampersand and whitespace in id tags (which drives the validator crazy). I strive to always follow the standards. And when in doubt, I come here.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)