{"id":255327,"date":"2022-10-26T09:24:16","date_gmt":"2022-10-26T01:24:16","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=255327"},"modified":"2022-10-20T12:24:30","modified_gmt":"2022-10-20T04:24:30","slug":"what-is-xhtml","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/what-is-xhtml.html","title":{"rendered":"\u4ec0\u4e48\u662f XHTML?"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nXHTML \u662f\u4ee5 XML \u683c\u5f0f\u7f16\u5199\u7684 HTML\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u4ec0\u4e48\u662f XHTML?<\/strong><\/div>\n

XHTML \u6307\u7684\u662f\u53ef\u6269\u5c55\u8d85\u6587\u672c\u6807\u8bb0\u8bed\u8a00
\nXHTML \u4e0e HTML 4.01 \u51e0\u4e4e\u662f\u76f8\u540c\u7684
\nXHTML \u662f\u66f4\u4e25\u683c\u66f4\u7eaf\u51c0\u7684 HTML \u7248\u672c
\nXHTML \u662f\u4ee5 XML \u5e94\u7528\u7684\u65b9\u5f0f\u5b9a\u4e49\u7684 HTML
\nXHTML \u662f 2001 \u5e74 1 \u6708\u53d1\u5e03\u7684 W3C \u63a8\u8350\u6807\u51c6
\nXHTML \u5f97\u5230\u6240\u6709\u4e3b\u6d41\u6d4f\u89c8\u5668\u7684\u652f\u6301<\/p>\n

\u4e3a\u4ec0\u4e48\u4f7f\u7528 XHTML?<\/strong><\/div>\n

\u56e0\u7279\u7f51\u4e0a\u7684\u5f88\u591a\u9875\u9762\u5305\u542b\u4e86\"\u7cdf\u7cd5\"\u7684 HTML\u3002<\/p>\n

\u5982\u679c\u5728\u6d4f\u89c8\u5668\u4e2d\u67e5\u770b\uff0c\u4e0b\u9762\u7684 HTML \u4ee3\u7801\u8fd0\u884c\u8d77\u6765\u975e\u5e38\u6b63\u5e38\uff08\u5373\u4f7f\u5b83\u5e76\u672a\u9075\u5b88 HTML \u89c4\u5219\uff09\uff1a<\/p>\n

<<\/span>html<\/span>><\/span>\r\n<\/span><<\/span>head<\/span>><\/span>\r\n<\/span><<\/span>meta<\/span> <\/span>charset<\/span>=<\/span>\"<\/span>utf-8<\/span>\"<\/span>><\/span>\r\n<\/span><<\/span>title<\/span>><\/span>\u8fd9\u662f\u4e00\u4e2a\u4e0d\u89c4\u8303\u7684 HTML<\/span><\/<\/span>title<\/span>><\/span>\r\n<\/span><<\/span>body<\/span>><\/span>\r\n<\/span><<\/span>h1<\/span>><\/span>\u4e0d\u89c4\u8303\u7684 HTML\r\n<\/span><<\/span>p<\/span>><\/span>\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d\r\n<\/span><\/<\/span>body<\/span>><\/span><\/pre>\n

XML \u662f\u4e00\u79cd\u5fc5\u987b\u6b63\u786e\u6807\u8bb0\u4e14\u683c\u5f0f\u826f\u597d\u7684\u6807\u8bb0\u8bed\u8a00\u3002<\/p>\n

\u4eca\u65e5\u7684\u79d1\u6280\u754c\u5b58\u5728\u4e00\u4e9b\u4e0d\u540c\u7684\u6d4f\u89c8\u5668\u6280\u672f\u3002\u5176\u4e2d\u4e00\u4e9b\u5728\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\uff0c\u800c\u53e6\u4e00\u4e9b\u53ef\u80fd\u5728\u79fb\u52a8\u7535\u8bdd\u6216\u5176\u4ed6\u5c0f\u578b\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002\u5c0f\u578b\u8bbe\u5907\u5f80\u5f80\u7f3a\u4e4f\u89e3\u91ca\"\u7cdf\u7cd5\"\u7684\u6807\u8bb0\u8bed\u8a00\u7684\u8d44\u6e90\u548c\u80fd\u529b\u3002<\/p>\n

\u6240\u4ee5 - \u901a\u8fc7\u7ed3\u5408 XML \u548c HTML \u7684\u957f\u5904\uff0c\u5f00\u53d1\u51fa\u4e86 XHTML\u3002XHTML \u662f\u4f5c\u4e3a XML \u88ab\u91cd\u65b0\u8bbe\u8ba1\u7684 HTML\u3002<\/p>\n

\u4e0e HTML \u76f8\u6bd4\u6700\u91cd\u8981\u7684\u533a\u522b<\/strong><\/div>\n
\u6587\u6863\u7ed3\u6784<\/strong><\/span><\/div>\n
    \n
  1. XHTML DOCTYPE \u662f\u5f3a\u5236\u6027\u7684<\/li>\n
  2. <html> \u4e2d\u7684 XML namespace \u5c5e\u6027\u662f\u5f3a\u5236\u6027\u7684<\/li>\n
  3. <html>\u3001<head>\u3001<title> \u4ee5\u53ca <body> \u4e5f\u662f\u5f3a\u5236\u6027\u7684<\/li>\n<\/ol>\n
    \u5143\u7d20\u8bed\u6cd5<\/strong><\/span><\/div>\n
      \n
    1. XHTML \u5143\u7d20\u5fc5\u987b\u6b63\u786e\u5d4c\u5957<\/li>\n
    2. XHTML \u5143\u7d20\u5fc5\u987b\u59cb\u7ec8\u5173\u95ed<\/li>\n
    3. XHTML \u5143\u7d20\u5fc5\u987b\u5c0f\u5199<\/li>\n
    4. XHTML \u6587\u6863\u5fc5\u987b\u6709\u4e00\u4e2a\u6839\u5143\u7d20<\/li>\n<\/ol>\n
      \u5c5e\u6027\u8bed\u6cd5<\/strong><\/span><\/div>\n
        \n
      1. XHTML \u5c5e\u6027\u5fc5\u987b\u4f7f\u7528\u5c0f\u5199<\/li>\n
      2. XHTML \u5c5e\u6027\u503c\u5fc5\u987b\u7528\u5f15\u53f7\u5305\u56f4<\/li>\n
      3. XHTML \u5c5e\u6027\u6700\u5c0f\u5316\u4e5f\u662f\u7981\u6b62\u7684<\/li>\n<\/ol>\n
        <!DOCTYPE ....>\u662f\u5f3a\u5236\u6027\u7684<\/strong><\/div>\n

        XHTML \u6587\u6863\u5fc5\u987b\u8fdb\u884c XHTML \u6587\u6863\u7c7b\u578b\u58f0\u660e\uff08XHTML DOCTYPE declaration\uff09\u3002<\/p>\n

        <html>, <head>, <title>, \u548c <body> \u5143\u7d20\u4e5f\u5fc5\u987b\u5b58\u5728\uff0c\u5e76\u4e14\u5fc5\u987b\u4f7f\u7528 <html> \u4e2d\u7684 xmlns \u5c5e\u6027\u4e3a\u6587\u6863\u89c4\u5b9a xml \u547d\u540d\u7a7a\u95f4\u3002<\/p>\n

        \u4e0b\u9762\u7684\u4f8b\u5b50\u5c55\u793a\u4e86\u5e26\u6709\u6700\u5c11\u7684\u5fc5\u9700\u6807\u7b7e\u7684 XHTML \u6587\u6863\uff1a<\/p>\n

        <<\/span>!<\/span>DOCTYPE<\/span> <\/span>html<\/span> <\/span>PUBLIC<\/span> <\/span>\"<\/span>-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN<\/span>\"<\/span>\r\n<\/span>\"<\/span>http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd<\/span>\"<\/span>><\/span> \r\n<\/span><<\/span>html<\/span> <\/span>xmlns<\/span>=<\/span>\"<\/span>http:\/\/www.w3.org\/1999\/xhtml<\/span>\"<\/span>><\/span> \r\n<\/span><<\/span>head<\/span>><\/span>\r\n  <\/span><<\/span>meta<\/span> <\/span>charset<\/span>=<\/span>\"<\/span>utf-8<\/span>\"<\/span>><\/span>\r\n  <\/span><<\/span>title<\/span>><\/span>\u6587\u6863\u6807\u9898<\/span><\/<\/span>title<\/span>><\/span>\r\n<\/span><\/<\/span>head<\/span>><\/span> \r\n<\/span><<\/span>body<\/span>><\/span>\r\n\u6587\u6863\u5185\u5bb9\r\n<\/span><\/<\/span>body<\/span>><\/span> \r\n<\/span><\/<\/span>html<\/span>><\/span><\/pre>\n
        XHTML \u5143\u7d20\u5fc5\u987b\u5408\u7406\u5d4c\u5957<\/strong><\/div>\n

        \u5728 HTML \u4e2d\uff0c\u4e00\u4e9b\u5143\u7d20\u53ef\u4ee5\u4e0d\u4e92\u76f8\u5d4c\u5957\uff0c\u50cf\u8fd9\u6837\uff1a<\/p>\n

        \r\n<<\/span>b<\/span>><\/span><<\/span>i<\/span>><\/span>\u7c97\u4f53\u548c\u659c\u4f53\u6587\u672c<\/span><\/<\/span>b<\/span>><\/span><\/<\/span>i<\/span>>\r\n<\/span><\/pre>\n

        \u5728 XHTML \u4e2d\uff0c\u6240\u6709\u7684\u5143\u7d20\u90fd\u5fc5\u987b\u4e92\u76f8\u5408\u7406\u5730\u5d4c\u5957\uff0c\u50cf\u8fd9\u6837\uff1a<\/p>\n

        \r\n
        <<\/span>b<\/span>><\/span><<\/span>i<\/span>><\/span>\u7c97\u4f53\u548c\u659c\u4f53\u6587\u672c<\/span><\/<\/span>i<\/span>><\/span><\/<\/span>b<\/span>>\r\n<\/span><\/div><\/pre>\n
        XHTML \u5143\u7d20\u5fc5\u987b\u6709\u5173\u95ed\u6807\u7b7e<\/strong><\/div>\n

        \u9519\u8bef\u793a\u4f8b\uff1a<\/p>\n

        \r\n
        <<\/span>p<\/span>><\/span>\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d\r\n<\/span><<\/span>p<\/span>><\/span>\u8fd9\u662f\u53e6\u5916\u4e00\u4e2a\u6bb5\u843d<\/span><\/div><\/pre>\n

        \u6b63\u786e\u793a\u4f8b\uff1a<\/p>\n

        <<\/span>p<\/span>><\/span>\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d<\/span><\/<\/span>p<\/span>><\/span>\r\n<\/span><<\/span>p<\/span>><\/span>\u8fd9\u662f\u53e6\u5916\u4e00\u4e2a\u6bb5\u843d<\/span><\/<\/span>p<\/span>><\/span><\/pre>\n
        \u7a7a\u5143\u7d20\u5fc5\u987b\u5305\u542b\u5173\u95ed\u6807\u7b7e<\/strong><\/div>\n

        \u9519\u8bef\u793a\u4f8b\uff1a<\/p>\n

        \u5206\u884c:<\/span><<\/span>br<\/span>><\/span>\r\n\u6c34\u5e73\u7ebf: <\/span><<\/span>hr<\/span>><\/span>\r\n\u56fe\u7247: <\/span><<\/span>img<\/span> <\/span>src<\/span>=<\/span>\"<\/span>happy.gif<\/span>\"<\/span> <\/span>alt<\/span>=<\/span>\"<\/span>Happy face<\/span>\"<\/span>><\/span><\/pre>\n

        \u6b63\u786e\u793a\u4f8b\uff1a<\/p>\n

        \u5206\u884c:<\/span><<\/span>br<\/span> <\/span>\/><\/span>\r\n\u6c34\u5e73\u7ebf: <\/span><<\/span>hr<\/span> <\/span>\/><\/span>\r\n\u56fe\u7247: <\/span><<\/span>img<\/span> <\/span>src<\/span>=<\/span>\"<\/span>happy.gif<\/span>\"<\/span> <\/span>alt<\/span>=<\/span>\"<\/span>Happy face<\/span>\"<\/span> <\/span>\/><\/span><\/pre>\n
        XHTML \u5143\u7d20\u5fc5\u987b\u662f\u5c0f\u5199<\/strong><\/div>\n

        \u9519\u8bef\u793a\u4f8b:<\/p>\n

        <<\/span>BODY<\/span>><\/span>\r\n<\/span><<\/span>P<\/span>><\/span>\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d<\/span><\/<\/span>P<\/span>><\/span>\r\n<\/span><\/<\/span>BODY<\/span>><\/span><\/pre>\n

        \u6b63\u786e\u793a\u4f8b\uff1a<\/p>\n

        <<\/span>body<\/span>><\/span>\r\n<\/span><<\/span>p<\/span>><\/span>\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d<\/span><\/<\/span>p<\/span>><\/span>\r\n<\/span><\/<\/span>body<\/span>><\/span><\/pre>\n
        \u5c5e\u6027\u540d\u79f0\u5fc5\u987b\u662f\u5c0f\u5199<\/strong><\/div>\n

        \u9519\u8bef\u793a\u4f8b\uff1a<\/p>\n

        <table WIDTH=\"100%\"><\/pre>\n

        \u6b63\u786e\u793a\u4f8b:<\/p>\n

        <table width=\"100%\"><\/pre>\n
        \u5c5e\u6027\u503c\u5fc5\u987b\u6709\u5f15\u53f7<\/strong><\/div>\n

        \u9519\u8bef\u793a\u4f8b\uff1a<\/p>\n

        <table width=100%><\/pre>\n

        \u6b63\u786e\u793a\u4f8b\uff1a<\/p>\n

        <table width=\"100%\"><\/pre>\n
        \u4e0d\u5141\u8bb8\u5c5e\u6027\u7b80\u5199<\/strong><\/div>\n

        \u9519\u8bef\u793a\u4f8b\uff1a<\/p>\n

        <input checked>\r\n<input readonly>\r\n<input disabled>\r\n<option selected><\/pre>\n

        \u6b63\u786e\u793a\u4f8b\uff1a<\/p>\n

        <input checked=\"checked\">\r\n<input readonly=\"readonly\">\r\n<input disabled=\"disabled\">\r\n<option selected=\"selected\"><\/pre>\n
        \u5982\u4f55\u5c06 HTML \u8f6c\u6362\u4e3a XHTML<\/strong><\/div>\n

        \u6dfb\u52a0\u4e00\u4e2a XHTML \u5230\u4f60\u7684\u7f51\u9875\u4e2d
        \n\u6dfb\u52a0 xmlns \u5c5e\u6027\u6dfb\u52a0\u5230\u6bcf\u4e2a\u9875\u9762\u7684html\u5143\u7d20\u4e2d\u3002
        \n\u6539\u53d8\u6240\u6709\u7684\u5143\u7d20\u4e3a\u5c0f\u5199
        \n\u5173\u95ed\u6240\u6709\u7684\u7a7a\u5143\u7d20
        \n\u4fee\u6539\u6240\u6709\u7684\u5c5e\u6027\u540d\u79f0\u4e3a\u5c0f\u5199
        \n\u6240\u6709\u5c5e\u6027\u503c\u6dfb\u52a0\u5f15\u53f7<\/p>\n

        \u4f7f\u7528 W3C \u9a8c\u8bc1\u5668\u6765\u6d4b\u8bd5\u4f60\u7684 XHTML<\/strong><\/div>\n

        \u8bf7\u5728\u4e0b\u9762\u7684\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u60a8\u7684\u7f51\u5740\uff1a
        \n<\/p>\n","protected":false},"excerpt":{"rendered":"

        XHTML \u6307\u7684\u662f\u53ef\u6269\u5c55\u8d85\u6587\u672c\u6807\u8bb0\u8bed\u8a00 XHTML \u4e0e HTML 4.01 \u51e0\u4e4e\u662f\u76f8\u540c\u7684 XHTML \u662f\u66f4\u4e25\u683c […]<\/p>\n","protected":false},"author":1470,"featured_media":255333,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-255327","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/255327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1470"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=255327"}],"version-history":[{"count":9,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/255327\/revisions"}],"predecessor-version":[{"id":255511,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/255327\/revisions\/255511"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/255333"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=255327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=255327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=255327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}