Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML 5 compatibility tag

    Hi all, i just started to learn HTML few days ago from internet. i realize from the website i learned, it says there is some tag like table attribute and font size that is not compatible in HTML 5.
    but i tried with those tags and it works fine.
    i declared the HTML code with <!DOCTYPE html> and i did use table attribute like border, align. Then i open my html file with Chrome and it did work.

    the link below is where i learned my code. it stated that those attribute not supported in HTML 5.
    HTML table tag

  • #2
    New Coder
    Join Date
    Jul 2014
    Posts
    12
    Thanks
    0
    Thanked 1 Time in 1 Post
    html 4 tags wont work when it is inside the html 5 tag.

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,917
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    Even though it might work it’s not good practice to use presentational attributes. There is a reason why they are deprecated. Use CSS for the presentation.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by alpha91 View Post
    it says there is some tag like table attribute and font size that is not compatible
    They were a part of HTML 3.2 and so browsers continue to support them so that pages written in 1996 and earlier will still display correctly.

    In 1997 HTML 4 and CSs were introduced which provide a much better way of controlling how web pages look.

    You might compare HTML 3.2 with its font sizes etc as being like a bicycle where HTML 4 is a racing car. Both will get you from one side of a continent to the other but one is a better choice.

    HTML 5 basically just adds tags for a few things that were not commonly used in web pages back in 1997 such as video and audio and extra form field types like dates and comboboxes.
    Last edited by felgall; 08-14-2014 at 09:36 PM.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,451
    Thanks
    17
    Thanked 275 Times in 275 Posts
    Just do a search for 'table css'. Everything you could do with the old HTML you can do with css, and more and easier too.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #6
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I see... because i still learning basic in HTML, i will get into CSS later.
    just that i curious when it says not compatible in HTML 5 but it still works.
    thanks for all the reply.

  • #7
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by alpha91 View Post
    I see... because i still learning basic in HTML, i will get into CSS later.
    just that i curious when it says not compatible in HTML 5 but it still works.
    thanks for all the reply.
    When you start using CSS some of the obsolete HTML gets overridden and no longer works.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #8
    Regular Coder
    Join Date
    Sep 2011
    Posts
    343
    Thanks
    3
    Thanked 37 Times in 37 Posts
    Quote Originally Posted by alpha91 View Post
    just that i curious when it says not compatible in HTML 5 but it still works.
    The site says "Not supported in HTML5", but that is not a correct term (either). It should be: "Not valid in HTML5" or "Deprecated in HTML5". If you have the following code validated, you will see that it throws two errors and a warning:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title>Demo</title>
    </head>
    <body>
        <table border="1" cellpadding="5" cellspacing="5">
            <tr>
                <td>Text</td>
            </tr>
        </table>
    </body>
    </html>
    There is such a thing as being supported or not, but that concerns the question whether a browser knows how to handle/render/process an HTML attribute, a Javascript method or a CSS thing (selector/property/value). I can't think of a good HTML attribute example right now, but there are plenty of examples of the latter two types that are only supported by more modern browsers.

    Browsers are in principle forgiving when it comes to deprecated HTML because of commercial reasons. But be aware: they are not when it comes to other reasons for invalidity, with only very few exceptions. So it would be wise to learn how to write valid code from the start. Also, if you are planning on doing web design for a living, writing valid code is good for PR and sales.

    Lastly, writing valid code makes debugging it in case of problems much, much, easier.
    Last edited by Frankie; 08-16-2014 at 01:37 PM.
    Frank

    How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.


  •  

    Posting Permissions

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