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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts

    HTML5 Validation problem

    Im trying to make my first HTML5 page but i simply cant get it to validate
    W3C keeps telling me that i have some errors i my meta tags.

    the page in question is http://www.jmphoto.dk/otus/index.html (its an old HTML4 page that i try to use as base/redeo as HTML 5)

    I cant find anny solution to get the following metatags to validate or find anny substitutes for them that will validate

    Code:
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />
    <meta name="distribution" content="Global" />
    <meta name="copyright" content="(c) 2012 OTUS" />
    I have used most of the day trying to find a solution on the net but with no luck so I realy hope somebody smart can help me with this.
    Last edited by Jesper Møller; 03-10-2012 at 12:21 AM.
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #2
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Why are you using html5 when it is still in development and will be for at least a few more years?

    Heck, even the w3c validator tells you that it is still in development and that its validation results cannot be trusted.

    Unless you really, really neeed to use draft html5 specific elements, imo you will be better off in the long run sticking to the Strict doctype of html4 or xhtml.
    Last edited by webdev1958; 03-10-2012 at 12:27 AM.

  • #3
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by webdev1958 View Post
    Why are you using html5 when it is still in development and will be for at least a few more years?
    Well
    1. I want to learn
    2. I most likely will be needing to use some html5 specific elements

    i know its in development, but i cant find annything on if those meta tag will be valid or if there is other meta tag to replace them
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #4
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Quote Originally Posted by Jesper Møller View Post
    but i cant find annything on if those meta tag will be valid or if there is other meta tag to replace them
    Could that be because html5 is still in development and it hasn't been decided yet?

    HTML5 is very likely to be different when it is finally recommended by the w3c in a few years time to what the state of the draft version is today.

    Do you recall the history behind the need for quirksmode? History will most likely repeat itself years down the track when html5 is officially released.

    The bottom line here is use html5 in its current draft state at your own peril.

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,627
    Thanks
    0
    Thanked 646 Times in 636 Posts
    Try removing the / out of the end of the tags and see if it validates like that - alternatively try getting rid of the unnecessary space before the /
    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.

  • #6
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    908
    Thanks
    0
    Thanked 120 Times in 119 Posts
    Quote Originally Posted by webdev1958 View Post
    Could that be because html5 is still in development and it hasn't been decided yet?

    HTML5 is very likely to be different when it is finally recommended by the w3c in a few years time to what the state of the draft version is today.

    Do you recall the history behind the need for quirksmode? History will most likely repeat itself years down the track when html5 is officially released.

    The bottom line here is use html5 in its current draft state at your own peril.
    Html5 is under development, but you make it sound like it is still Alpha.
    There might be minor adjustments, but most changes are extensions to the language.
    Html5 is now a reliable language.

    But
    Quote Originally Posted by Jesper Møller View Post
    Im trying to make my first HTML5 page but i simply cant get it to validate
    W3C keeps telling me that i have some errors i my meta tags.

    the page in question is http://www.jmphoto.dk/otus/index.html (its an old HTML4 page that i try to use as base/redeo as HTML 5)

    I cant find anny solution to get the following metatags to validate or find anny substitutes for them that will validate

    Code:
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />
    <meta name="distribution" content="Global" />
    <meta name="copyright" content="(c) 2012 OTUS" />
    I have used most of the day trying to find a solution on the net but with no luck so I realy hope somebody smart can help me with this.
    Code:
    <meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />
    must be:
    Code:
    <meta http-equiv="last-modified" content="Thu, 14 Apr 2011 12:17:27 GMT">
    and the content for http-equiv="Expires" must be a date string just like the http-equiv="last-modified"
    but should be the date when the currently cached files should no longer be valid.
    Though it can be used as an alternative no-cache, it is not its purpose.

    It will still not be recognized as Valid by the validator, but it is to be ignored, as the validator is not fully up to date, as despribed under "Notes and potential Issues" on the validator page:
    Using experimental feature: HTML5 Conformance Checker.

    The validator checked your document with an experimental feature: HTML5 Conformance Checker. This feature has been made available for your convenience, but be aware that it may be unreliable, or not perfectly up to date with the latest development of some cutting-edge technologies. If you find any issues with this feature, please report them. Thank you.
    Last edited by Lerura; 03-10-2012 at 02:31 AM.

  • Users who have thanked Lerura for this post:

    Jesper Møller (03-11-2012)

  • #7
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Quote Originally Posted by lerura View Post
    Html5 is now a reliable language.
    I disagree and browser support for it varies amongst the major browsers.

  • #8
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,627
    Thanks
    0
    Thanked 646 Times in 636 Posts
    Quote Originally Posted by lerura View Post
    Html5 is under development, but you make it sound like it is still Alpha.
    It is still Alpha - the current draft is filled with multiple tags that serve the same purpose and attributes that contradict one another. By the time that it gets to a beta stage (with a release candidate rather than a preliminary draft) about half of the proposed new tags and attributes will have been deleted as unnecessary. Currently it is yet to be determined which of the alternatives is preferred so as to get rid of the others.

    For example an input tag in HTML 5 can have both a required attribute and a pattern="^$" attribute at the same time so as to guarantee that the form will never submit because of invalid data. The required attribute needs to be deleted in order to resolve that conflict - pattern="^.+$" is HTML 5 for a required field without needing the required attribute at all.

    HTML 5 also proposes introducing new tags to fix problems in IE5 and IE6 which will be completely forgotten by the time HTML 5 gets to beta so those new tags will no longer be necessary as the existing tags for the same purpose will work properly in all browsers in HTML 4 making the addition of the extra tags ridiculous.

    Also once HTML 5 actually does become a standard they'll have to give it a long version of the doctype rather than just using the short version which is just as valid for HTML 2 as it is for HTML 5 - in fact its actually more valid for HTML 2 because HTML 5 isn't based on SGML and so shouldn't have an SGML doctype.
    Last edited by felgall; 03-10-2012 at 02:59 AM.
    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.

  • #9
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    908
    Thanks
    0
    Thanked 120 Times in 119 Posts
    Quote Originally Posted by felgall View Post
    It is still Alpha
    If that's the case, then they hide it well.

    Among the tags I have seen docuentation for, i can see no same-purpose-tags.

    Some of them might only be for the editor of the document, as they have either have similar rendering as others tags: <b> vs. <strong>
    or are pre-styled version's of other tags: <span> vs. <hx>.
    But I see none of them as same-purpose.

    In the case with required vs pattern:
    The one denotes that input is required, while the other specifies a pattern that the input must follow.
    But using required when pattern is defined is unnecessary, as if input must follow a pattern, an input is of course required.
    It would be just as foolish as <span style="display:inline;"></span>

    If the pattern specifies that no text must be entered. then they would be contradictory, but it makes no sense to have a <input> that must be left empty.

  • Users who have thanked Lerura for this post:

    TheAliveWinner (03-10-2012)

  • #10
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,627
    Thanks
    0
    Thanked 646 Times in 636 Posts
    Quote Originally Posted by lerura View Post
    Among the tags I have seen docuentation for, i can see no same-purpose-tags.
    The new HTML 5 <iframe> and <embed> tags duplicate functionality already available via the HTML 4 <object> tag at a time when all of the reasons for using the proprietary <embed> tag are long gone and all the reasons for using the proprietary <iframe) tag will be gone once IE7 dies.

    Quote Originally Posted by lerura View Post
    In the case with required vs pattern:
    The one denotes that input is required, while the other specifies a pattern that the input must follow.
    pattern="^.+$" denotes that a field is required - providing a second way to say the same thing is again a duplication which in this instance can result in contradictory settings. In fact since it makes no sense to specify pattern="^$" as you suggest and I agree it basically means that the inclusion of ANY pattern means that the field is required unless the pattern starts with (^$)| which would indicate "empty or something that matches the other part of the pattern" - ie the pattern can indicate whether a field is required or optional by whether it starts with that code. The only purpose required serves is to be able to prevent the form being submitted by contradicting the pattern.

    For example if a field can contain 'yes', 'no' or be left blank then pattern="(^$)|(^yes$)|(^no$)" whereas if it is required then pattern="(^yes$)|(^no$)" and the required attribute is not needed at all as it simply duplicates or contradicts part of the pattern.


    See http://en.wikipedia.org/wiki/W3C_recommendation for the list of the stages thatweb standards go through. HTML 5 is currently at the "Working Draft" stage. This is actually pre-alpha since a "Candidate Recommendation" would be an alpha version and a "Proposed Recommendation" would be a beta version with the final standard being the "W3C Recommendation".
    Last edited by felgall; 03-10-2012 at 09:47 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.

  • #11
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    908
    Thanks
    0
    Thanked 120 Times in 119 Posts
    I agree in, as required is an attribute that can easily defined otherwise, it is not a essential attribute, and the deprecation of it would not lead to a loss of functionality.
    And in that sense it is unnecessary, and could just as well deprecate.

    You can actually say the same about <img>.
    Though <img> predated <object>, it is now nothing more than a <object> predefined to contain images, just as <iframe> basically is predefined to contains external pages, and <embed>, to contain medias.
    It may not be their official definitions, but it is so in practice.

    There are a lot of non-essential tags nowadays like <i> <b> <strong> <em> <hx> <code> <cite> <dfn> <var> <kbd> <samp> <del> <ins> <s> ... , which are in fact just prestyled <span>s that, for some of them, give the editor a hint of the origin of it content. - Is it a citation, as sample, a definition, and so on.

    None of then have any further functionality.

    a huge part of the existing tags, could be cooked down to <span> <div> and <object>

    unlike <select> <form> <input> <a> and other that have their own specific functionality.

    The only of the above mensioned predefined tags that I ever use is <img>, so to me, the could remove all the others.
    Last edited by Lerura; 03-10-2012 at 11:58 PM.

  • #12
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by lerura View Post
    None of then have any further functionality.
    False. A couple of examples:

    hx - used to create a document tree, as it has meaning
    em - used for emphasis in screen readers

    These also have meaning when the HTML file is standalone. This is why we have semantic tags.

  • #13
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    908
    Thanks
    0
    Thanked 120 Times in 119 Posts
    Well, I didn't know of the em's function in screen readers.

    And Yes. - <hx> has it's meaning, but do it have a functionality that can't be resembled with <p style="font-weight:bold;font-size:xxpx;"> or similar ? (not <span> as i mistakenly listed it as.)

  • #14
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by lerura View Post
    Well, I didn't know of the em's function in screen readers.

    And Yes. - <hx> has it's meaning, but do it have a functionality that can't be resembled with <p style="font-weight:bold;font-size:xxpx;"> or similar ? (not <span> as i mistakenly listed it as.)
    No. You cannot create a document tree from random paragraphs, as paragraphs are paragraphs and do not have the same semantic meaning. There is no way--other than guesswork--for a machine to differentiate a heading which is a styled paragraph and a normal paragraph.

  • #15
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    908
    Thanks
    0
    Thanked 120 Times in 119 Posts
    I actually set it up as a question:
    Do <hx> do have any functionality that is lost is you replace it with a styled paragraph.
    Or said in another way: is there any situation where differing is essential. from the machine's POV.
    If so: Where and/or when?


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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