1

标题几乎说明了一切。我认为它的格式正确,但由于某种原因,使用浏览器打开时我仍然看到标签。对代码墙感到抱歉,我很确定问题很简单,但现在复制和粘贴整个内容对我来说是最简单的。

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="1038.36">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
    span.Apple-tab-span {white-space:pre}
  </style>
</head>
<body>
<p class="p1">&lt;html xmlns="http://www.assignment9.com/xhtml"&gt;</p>
<p class="p1">&lt;head&gt; &lt;title&gt;James&lt;/title&gt; &lt;/head&gt;</p>
<p class="p2"><br></p>
<p class="p1">&lt;body style="background-color : black; color : white"&gt;</p>
<p class="p1"><span class="Apple-tab-span"> </span>&lt;h1&gt;Musical background&lt;/h1&gt;</p>
<p class="p1">&lt;p&gt;James has had a rich musical background.<span class="Apple-converted-space">  </span>He started playing the upright bass at 10 years old.<span class="Apple-converted-space">  </span>From there he moved to the electric bass at 13 and guitar at 15.<span class="Apple-converted-space">  </span>Guitar is his true love and calling.<span class="Apple-converted-space">  </span>James has been self taught on guitar for 8 years and is now gigging fairly often in the hartford area. &lt;/p&gt;</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-tab-span"> </span>&lt;h2&gt;James' Favorite Musical Groups&lt;/h2&gt;</p>
<p class="p1">&lt;p&gt;With all the genre's of music out there, James has been influenced by bands and artists from several genre's including, The Eagles, Van Halen, Brad Paisley, Europe, Joe Bonamassa.<span class="Apple-converted-space">  </span>&lt;/p&gt;</p>
<p class="p2"><br></p>
<p class="p1">&lt;img src="IMG_0123" alt="PRS Santana SE/&gt;</p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-tab-span"> </span>&lt;h3&gt;Musical Instruments&lt;/h3&gt;</p>
<p class="p1">&lt;p&gt;James currently 4 guitars and he loves each and everyone one of them.<span class="Apple-converted-space">  </span>His first guitar was a Fender Stratocaster.<span class="Apple-converted-space">  </span>It served as his only electric guitar until earlier this year when he purchased a PRS Santana SE.<span class="Apple-converted-space">  </span>This is now his primary electric guitar.<span class="Apple-converted-space">  </span>For acoustic guitars, has a Takemine G Series acoustic electric guitar and a Breedlove 514CE acoustic electric guitar.<span class="Apple-converted-space">  </span>He frequently is seen giggling with both guitars&lt;/p&gt;</p>
<p class="p2"><br></p>
<p class="p1">&lt;/body&gt;</p>
<p class="p1">&lt;/html&gt;</p>
</body>
</html>
4

2 回答 2

2

看起来您使用的是 Cocoa HTML 编写器,但将 HTML 粘贴到了可视化(所见即所得)编辑器中。问题在于它使用 html 编码等效项(例如&gt;)对您的所有标签进行编码。如果此软件具有 HTML/源视图,请尝试将您的内容粘贴到那里然后保存。

如果不将内容粘贴到不进行 html 格式化的普通文本编辑器中,然后使用 .html 扩展名保存文件。

如果您不确定如何提取原始 HTML 代码,请删除 <p> 标记,然后将文本复制到以下站点:http ://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/decode.aspx

于 2013-10-23T01:45:21.443 回答
0

您的问题是您的 HTML 中的内容是 HTML 实体。&lt;与文字 <&gt;相同,与 > 相同,因此它正确格式化了您的 html,但您的内容看起来就像 HTML。

这是关于 HTML 实体的链接:http: //www.w3schools.com/html/html_entities.asp

于 2013-10-23T01:26:28.710 回答