Do put / character in end of meta tag is required?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oranoos3000
    New Member
    • Jan 2009
    • 107

    Do put / character in end of meta tag is required?

    hi
    i ' d like to know that puting / character in the end of meta tag is required
    the version of my doctype that i used is strict
    and another my question is as follow
    and what is meaning of property xmlns in html tag <html xmlns="http://www.w3.org/1999/xhtml">?

    thanks alot
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    those two things are required, if you serve your document as XML*. the / denotes an empty element and the xmlns attribute is the namespace that you must apply in XHTML.

    * - that is, the MIME type of the document is: text/xml, application/xhtml+xml, application/xml, etc. but not text/html.

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      The meaning of the xmlns part is "XML namespace". For the element
      <html xmlns="http://www.w3.org/1999/xhtml"> you are stating that elements are in the XHTML namespace as defined by the W3 at that URI. If the user agent or browser does not know if the tags you use are legitimate, it can go to that address to check. Browsers know what html and xhtml are so they really don't do that.

      It helps in cases where you might have a <p> element, for example, that you want to have two different meanings in two cases. You would write them one as <html:p> and the other as <mytag:p> if you stated the namespace as:

      <html xmlns="http://www.w3.org/1999/xhtml"
      mytag:xmlns="ht tp://www.mytags.com/mytags">

      Chances are, you don't serve your page as xhtml anyway so using that line is as useless as writing markup with xhtml.

      Comment

      Working...