XML file does not appear to have any style information associated with it. XHTML程序出现这个错误
生活随笔
收集整理的這篇文章主要介紹了
XML file does not appear to have any style information associated with it. XHTML程序出现这个错误
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?編寫xhtml代碼出現錯誤:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<?xml version = "1.0" encoding ="UTF-8"?> <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns = "http://www.w3.org/1999/en" lang= "en" xml:lang = "en"><head><title>First xhtml document</title></head><body><div>This is <abbr title = "www.anacronym.com">an acronym</abbr> in a division.</div><div>This is <cite>a citation</cite> in a division.</div><div>This is <code>some code</code> in a division.</div><div>This is <em>EMPHASIZED TEXT</em> in a division.</div><div>This is <q>a quotation</q> in a division.</div><div>This is <samp>a sample</samp> in a division.</div><div>This is <span>a span </span> in a division.</div><div>This is <strong>strong text</strong> in a division.</div><div>This is <var>a variable name</var> in a division.</div><div><quot>This is a quot</quot></div></body> </html>找了半天,終于找到了,因為 <html xmlns = "http://www.w3.org/1999/en" lang= "en" xml:lang = "en">,這句錯了,改為:
<html xmlns = "http://www.w3.org/1999/xhtml" lang= "en" xml:lang = "en">
改正后的代碼如下:
<?xml version = "1.0" encoding ="UTF-8"?> <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml" lang= "en" xml:lang = "en"><head><title>First xhtml document</title></head><body><div>This is <abbr title = "www.anacronym.com">an acronym</abbr> in a division.</div><div>This is <cite>a citation</cite> in a division.</div><div>This is <code>some code</code> in a division.</div><div>This is <em>EMPHASIZED TEXT</em> in a division.</div><div>This is <q>a quotation</q> in a division.</div><div>This is <samp>a sample</samp> in a division.</div><div>This is <span>a span </span> in a division.</div><div>This is <strong>strong text</strong> in a division.</div><div>This is <var>a variable name</var> in a division.</div><div><quot>This is a quot</quot></div></body> </html>運行結果如下:
This is an acronym in a division. This is a citation in a division. This is some code in a division. This is EMPHASIZED TEXT in a division. This is a quotation in a division. This is a sample in a division. This is a span in a division. This is strong text in a division. This is a variable name in a division. This is a quot 與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的XML file does not appear to have any style information associated with it. XHTML程序出现这个错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HTML <dfn> 标签的简单介绍
- 下一篇: forward_list的insert操