How to use HTML5 features with XHTML

后端 未结 2 737
猫巷女王i
猫巷女王i 2020-12-20 19:50

I need some help with web programming. I have to do this assignment from school and the prof has given details on the structuring. One of them is that my site should be XHTM

2条回答
  •  生来不讨喜
    2020-12-20 20:12

    The interpretation of the assignment that seems to make most sense is that you are required to use XHTML linearization of HTML5, also known as XHTML5. This simply means that you use HTML5 like anyone else but do that using general XML principles.

    In the example case, this would mean the following markup:

    
    
    
    
    
    
    
    
    
    

    The XHTML 1.0 doctypes are something quite different. They define fixed versions of HTML, so you cannot use, in the static markup, anything not allowed by those versions, i.e. anything that is new in HTML5 as compared with XHTML 1.0 and HTML 4.01 (which is what “HTML5 feature” probably means in the assignment). The requirement “XHTML compliant (Strict or Transitional)” is obscure, but if it is meant to refer to XHTML 1.0 specifically, then the assignment is self-contradictory (unless you are supposed to use client-side scripting to get to “HTML5 features”).

    (This answer was largely rewritten thanks to @Alohci’s comments.)

提交回复
热议问题