www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] HTML 5 and character codes

  1. #1
    Join Date
    Oct 2006
    Location
    Ables Springs, Texas
    Posts
    139

    resolved [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?

    Code:
    –   &

  2. #2
    Join Date
    Mar 2011
    Posts
    1,139
    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.
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Mar 2005
    Location
    Behind you...
    Posts
    862
    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?"

  4. #4
    Join Date
    Oct 2006
    Location
    Ables Springs, Texas
    Posts
    139
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles