Start a Chat Sales: 0800 862 0890 Client Area
Results 1 to 4 of 4

Thread: HTML 5 - What's changed in HTML 5? Doctype and simplicity!

  1. #1
    Ben Stones is offline Administrator
    Join Date
    Aug 2011
    Posts
    199

    Default HTML 5 - What's changed in HTML 5? Doctype and simplicity!

    HTML 5 is definitely going to make our lives easier as web developers. Here are some of the biggest changes coming to HTML 5 that you'll notice (not all of which is listed here - feel free to respond with any further HTML 5 spec.)

    HTML 5 doctype declaration
    Right now, to declare the doctype is nothing short of long and confusing, and it could be much, much simpler. Luckily, the W3C has agreed. In HTML 5, the doctype is incredibly simple:

    Old:
    Code:
    1.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    New:
    Code:
    <!DOCTYPE html>
    The doctype is necessary to ensure compatibility with browsers that require a doctype declaration. However, when HTML 5 is in full swing, it won't be necessary.

    The type attribute in script and style HTML tags

    You no longer need to specify the type of the script or style tag. By default, the browser should assume it is a JavaScript or CSS stylesheet, respectively. This is implied unless explicitly stated otherwise by the use of the type tag atttribute.

    New "e-mail" text field
    In HTML 5, you will have some form of client-side validation by the use of amn email text field type. The browser will do client-side validation that can safe time on the server-side, as most people will not bypass the client-side validation checks. However, that said, it is still important to do server-side checks; it's easy to bypass any kind of client-side validation checks, including JavaScript checks. It's merely more for end-user convenience than anything else.

    Code:
    <input type="email" name="email">
    "Pattern" attribute in text fields
    You can now do client-side regular expression checks. If you're familar with the use of regular expressions in programming languages like Perl and PHP, you'll feel right at home with the pattern attribute of the input tag. It can safe processing time on the server-side as a lot of the checks will be conducted on the client-side. Again, always still do server-side checks to be absolutely safe. It would be a rookie mistake to simply trust client-side validation checks - they can be bypassed very easily.

    Code:
    <input type="text" name="username" pattern="[a-zA-Z]{3,25}">
    This requires that a username be at least 3 characters long and no more than 25 - again, a client-side validation check.
    Regards,
    [url=http://b3ns.com]Ben Stones[/url]


    Need to contact us?

    Support - 0808 262 0606 or [URL="http://support.webhosting.uk.com"]
    support.webhosting.uk.com[/URL]
    Customer Relations - 0808 262 0855 or [URL="http://support.webhosting.uk.com"]
    support.webhosting.uk.com[/URL]
    Sales - 0800 862 0890 or [email]sales@webhosting.uk.com[/email]


    Contact
    [email]ben@webhosting.uk.com[/email]
    Skype ID: whuk_ben

  2. #2
    annahussy is offline Banned
    Join Date
    Jul 2012
    Location
    India
    Posts
    16

    Default

    Hi, Very nice sharing here that's really great to getting knowledge about this HTML5 elements changes. HTML5 is really very nice and useful language to learn and its also very useful to use. It's have many new function that really good to use.

  3. #3
    madelinekim is offline Junior Member
    Join Date
    Jul 2012
    Location
    india
    Posts
    29

    Default

    HTML5 is really the best tool which is the advanced level of HTML. HTML5 is the reliable due to its advanced tools and features like audio, video, canvas etc. You can make the thing easier and smoother by using HTML5.

  4. #4
    Shuang is offline Junior Member
    Join Date
    Feb 2012
    Posts
    25

    Default

    Good to know about HTML5, haven't tried it yet however am now confused between using CSS orHTML Which is better and why?
    Your opinion will help me to decide the coding part for my future websites !

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright 2001-2013 Web Hosting UK. All rights reserved.