Jump to content

ajkaramba

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by ajkaramba

  1. Hello! I'm a beginner when it comes to XHTML/HTML and therefore I have a question. As far as I know you are supposed to tell the browser what (X)HTML version the document uses in the <!DOCTYPE>-tag and then the browser will "understand" and read the document correctly. But you also provide a link to a DTD that says exactly what elements are allowed etc. My question: Does the browser read the DTD in order to display the document or can it display the document properly by just knowing the actual (X)HTML version stated in <!DOCTYPE>? If the browser doesn't read the DTD, then why is it necessary to include a link to it in the <!DOCTYPE>-tag? Thanks!
  2. Hello!I have to correct syntax errors in a document that looks something like this: <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Title</title></head><body><p>content</p></body></html>There are a lot of syntax errors in the full verision of the document, but some end tags like </p> are also missing. I don't know if I'm supposed to add tags like </p> because if this document is HTML5 it isn't necessary.When I validate the document at http://validator.w3.org/check it says that it is HTML5, but <html xmlns="http://www.w3.org/1999/xhtml"> makes me wonder...Can anyone please tell me if this is a HTML5 or XHTML document? I usually close all tags but since I'm supposed to correct syntax errors I'm not sure if I should close all tags because the validator (which says that it's HTML5) doesn't say that a missing end tag is a syntax error. I mean, if it's HTML5 my teacher shouldn't be allowed to complain about it... Do you think I will fail the assignment if I don't close all tags? Thanks!
×
×
  • Create New...