Mainly in the code specification, the XHTML specification will be more stringent

XHTML elements must be properly nested

  • Correct demonstration

    <b><i>This text is bold and italic</i></b>
    Copy the code
  • Error model

    <b><i>This text is bold and italic</b></i>
    Copy the code

XHTML elements must be closed

  • Correct demonstration

    <p>This is a paragraph</p>
    <p>This is another paragraph</p>
    
    A break: <br />
    A horizontal rule: <hr />
    An image: <img src="happy.gif" alt="Happy face" />
    Copy the code
  • Error model

    <p>This is a paragraph
    <p>This is another paragraph
    
    A break: <br>
    A horizontal rule: <hr>
    An image: <img src="happy.gif" alt="Happy face">
    Copy the code

The label name must be lowercase

  • Correct demonstration

    <body>
        <p>This is a paragraph</p>
    </body>
    Copy the code
  • Error model

    <BODY>
        <P>This is a paragraph</P>
    </BODY>
    Copy the code

XHTML documents must have a root element

  • All XHTML elements must be nested within the root element

    <html>
    <head> ... </head>
    <body> ... </body>
    </html>
    Copy the code

The content/inspiration of the article is taken from below

  • Continuous maintenance/update 500+ front end questions/notes github.com/noxussj/Int…

  • [Big data visualization chart plug-in] www.npmjs.com/package/ns-…

  • [3D city modeling using three.js (Zhuhai)] 3D.noxussJ.top /