Câu hỏi phỏng vấn HTML
Câu hỏi

What are some differences that XHTML has compared to HTML?

Câu trả lời

XHTML, or Extensible Hypertext Markup Language, differs from HTML (Hypertext Markup Language) in several key ways:

  1. Syntax Strictness: XHTML is much stricter in terms of syntax compared to HTML. In XHTML, all elements must be properly nested, attributes must be quoted, and all tags must be closed. For example, in HTML, it is permissible to use <br> for a line break, whereas in XHTML, you must use <br />[1][2][4].

  2. Case Sensitivity: XHTML is case-sensitive, meaning that all tags and attributes must be written in lowercase. HTML, on the other hand, is not case-sensitive[2][5].

  3. Document Structure: XHTML documents must have a root element that encloses all other elements, and they must strictly follow the XML structure. This is not a requirement in HTML where elements can be more loosely organized[1][2][4].

  4. Compatibility and Extensibility: XHTML was developed to be more compatible with XML, allowing for easier integration and transformation of data across different XML applications. This makes XHTML more suitable for data-driven applications where XML is commonly used[2][4].

  5. DOCTYPE Declaration: XHTML requires a DOCTYPE declaration at the beginning of the document to ensure that ...

middle

middle

Gợi ý câu hỏi phỏng vấn

middle

What is the difference between

and
?

senior

Why to use HTML5 semantic tags?

middle

What are defer and async attributes on a