29 users online (1 members and 28 guests)  


  Results 1 to 10 of 10

Related

  1. Browser Based HTML Email Forms    Forum: HTML Forum
    Replies: 1
  2. doctype "STRICT"    Forum: CGI Perl Forum
    Replies: 0
  3. need help on getting html content    Forum: HTML Forum
    Replies: 2
  4. HTML Validator    Forum: HTML Forum
    Replies: 7
  5. html and resize of browser    Forum: HTML Forum
    Replies: 1
  1. #1
    Andrew.Golik's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    3

    The doctype validator. Does browser validate the html content via doctype directive?

    Does any browser validate the html content via validator?
    I mean I have to put directive at the top of html content, for instance (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd").
    What would be if my html is not valid?
    thanks.

  2. #2
    coreybryant's Avatar
    Texan at Heart

    Status
    Offline
    Join Date
    Jun 2003
    Location
    Castle Rock, CO
    Posts
    107

    Re: The doctype validator. Does browser validate the html content via doctype directi

    The browser would attempt to render your HTML as best as it is programmed to do.

    Even then, some browsers do not follow HTML standards

  3. #3
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: The doctype validator. Does browser validate the html content via doctype directi

    Modern browsers are supposed to render the document using the rules defined in the supplied DOCTYPE. They aren't always (or even often!) reliable in this matter, but it's gradually improving ...
    If that is missing, they revert to their own default rendering.

  4. #4
    Andrew.Golik's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    3

    Re: The doctype validator. Does browser validate the html content via doctype directi

    So you are telling me that browser is supposed to go to "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" to find out the definition and then to render the html.
    Does my IE6 do such things?
    For example, if it were xml with DTD my IE would not show error if the XML is invalid as I remeber.
    I need to use the special tools to validate my xml with DTD or XSD.

    My question is what browser are using the doctype?
    And how can I check it?
    I mean maybe somebody here faced the issues because of DOCTYPE?

    Maybe somebody has a sample of html code that show the difference of usage several doctypes?

    thanks.

  5. #5
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: The doctype validator. Does browser validate the html content via doctype directi

    No - that's where the definition is held, though.
    The standard definitions should be within the browser, but if the browser is following the schema as set out by xhtml1-transitional and finds unrecognised tags, it should simply ignore them.
    I think that with true xml, you can define your own schema, and the option is there (I have no idea whether this is implemented or not) for the browser to go to the URI specified in the doctype and download it if it is not recognised.
    The browser does not validate anything, it just renders it as best it can.
    If you need examples they should all be available on w3.org.

  6. #6
    Andrew.Golik's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    3

    Re: The doctype validator. Does browser validate the html content via doctype directi

    does browser download the dtd schema in case of unrecognized tags in html content?
    Or it download it anyway?
    does the dtd schema help browser to render the html?
    Can I write my dtd shema then put it into doctype?

  7. #7
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: The doctype validator. Does browser validate the html content via doctype directi

    The definition will only be downloaded if a correctly formed unrecognised <DOCTYPE> is found, and even then only if the browser is set up to do so. I'm not even sure if the current crop of browsers do this yet.

  8. #8
    David Albert's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    9

    Exclamation Yes the doctype validator. Does browser validate the html content via doctype directi

    According to HTML standards, each HTML document requires a dtd(document type declaration). The "DOCTYPE" begins the HTML document and tells a validator which version of HTML to use in checking the document's syntax. The following link will give you a complete detail.

    http://www.**************.com/Validate/Doctype.htm
    Regards.
    Last edited by HTML; 10-26-2007 at 07:16 AM. Reason: link to stolen content removed

  9. #9
    David Albert's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    9

    Exclamation Re: The doctype validator. Does browser validate the html content via doctype directi

    The firefox browser validates all the html, xml contents via doctype directive. The following is an example url:

    http://www.**************.com/Validate/DoctypeHtmlXML.htm"

    You can learn more about doctype directive from the above link.
    thanks.
    Last edited by HTML; 10-26-2007 at 07:16 AM. Reason: link to stolen content removed

  10. #10
    David Albert's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    9

    Exclamation Yes the dtd schema help browser to render the html

    Yes Andrew the dtd schema help browser to render the html. You can get more help on:

    [FONT=Times New Roman]http://www.**************.com/Validate/DTD.htm/FONT]

    if you need more help please post again. Hopefully the above link will help you to the end.
    best regards
    Last edited by HTML; 10-26-2007 at 07:16 AM. Reason: link to stolen content removed