有懂HTML的大神吗?为什么我这段代码总是报错?

<!doctype html>
<html lang="en">

<head>
<title>TCP/IP Definitions</title>
<meta charset="utf-8">
<link rel="stylesheet" href="http://www.wenba.ca/tcpip.css">
</head>

<body>
<h1>TCP/IP Definitions(from Webopedia)</h1>
<h2>TCP/IP</h2>
<p class="first">(pronounced as separate letters) Short for<em>Transmission
Control Protocol/Internet Protocol</em>, the suite of
communications protocols used to connect <u>hosts</u> on the
Internet. <strong>TCP/IP</strong> uses several protocols, the two main ones
being TCP and IP. <strong>TCP/IP</strong> is built into the UNIX operating
system and is used by the Internet, making it the de facto
standard for transmitting data over networks. Even network
operating systems that have their own protocols, such as
Netware, also support <strong>TCP/IP</strong>.</p>
<h2>TCP</h2>
<p class="first">Abbreviation of <em>Transmission Control Protocol</em>, and
pronounced as separate letters. TCP is one of the main
protocols in <strong>TCP/IP</strong> networks. Whereas the IP protocol deals
only with <u>packets</u>, TCP enables two <u>hosts</u> to establish a
connection and exchange streams of data. TCP guarantees
delivery of data and also guarantees that <u>packets</u> will be
delivered in the same order in which they were sent.</p>
<h2>IP</h2>
<blockquote class="first">(pronounced as separate letters) Short for <em>Internet
Protocol</em>. IP specifies the format of <u>packets</u>, also called
datagrams, and the addressing scheme. Most networks combine
IP with a higher-level protocol called <em>Transmission Control
Protocol</em>(TCP), which establishes a virtual connection
between a destination and a source.
</blockquote>
<blockquote>IP by itself is something like the postal system. It allows
you to address a package and drop it in the system, but
there's no direct link between you and the recipient.
TCP/IP, on the other hand, establishes a connection between
two <u>hosts</u> so that they can send messages back and forth for
a period of time.
</blockquote>
<blockquote>The current version of IP is IPv4. A new version, called
IPv6 or IPng, is under development.
</blockquote>
<h2>IP Address</h2>
<p class="first">An identifier for a computer or device on a <strong>TCP/IP</strong> network.
Networks using the TCP/IP protocol route messages based on
the IP address of the destination. The format of an IP
address is a 32-bit numeric address written as four numbers
separated by periods. Each number can be zero to 255. For
example, 1.160.10.240 could be an IP address.</p>
<p>Within an isolated network, you can assign IP addresses at
random as long as each one is unique. However, connecting a
private network to the Internet requires using registered
IP addresses (called Internet addresses) to avoid
duplicates.</p>
<p>The four numbers in an IP address are used in different
ways to identify a particular network and a host on that
network. Four regional Internet registries -- ARIN, RIPE
NCC, LACNIC and APNIC -- assign Internet addresses from the
following three classes.</p>
<ul>
<li>Class A - supports 16 million <u>hosts</u> on each of 126 networks</li>
<li>Class B - supports 65,000 <u>hosts</u> on each of 16,000 networks</li>
<li>Class C - supports 254 <u>hosts</u> on each of 2 million networks</li>
</ul>
<p>The number of unassigned Internet addresses is running out,
so a new classless scheme called CIDR is gradually
replacing the system based on classes A, B, and C and is
tied to adoption of IPv6.</p>
<h2 class="first">IPv6</h2>
<p id="last">IPv6 (<em>Internet Protocol</em> Version 6) is also called IPng
(<em>Internet Protocol</em> next generation) and it is the newest
version of the <em>Internet Protocol</em> (IP) reviewed in the IETF
standards committees to replace the current version of IPv4
(<em>Internet Protocol</em> Version 4).</p>
<p>The official name of IPng is IPv6, where IP stands for
<em>Internet Protocol</em> and v6 stands for version 6.</p>
<p><em>Internet Protocol</em> Version 6 (IPv6) is the successor to
<em>Internet Protocol</em> Version 4 (IPv4). IPv6 was designed as an
evolutionary upgrade to the Internet Protocol and will, in
fact, coexist with the older IPv4 for some time. IPv6 is
designed to allow the Internet to grow steadily, both in
terms of the number of <u>hosts</u> connected and the total amount
of data traffic transmitted.</p>
<p>IPv6 is an <em>Internet Protocol</em> (IP) for packet-switched
internetworking that specifies the format of <u>packets</u> (also
called datagrams) and the addressing scheme across multiple
IP networks. In comparing the two protocols IPv6 expands
upon the addressing and routing capabilities of IPv4 in a
number of ways including:</p>
<ul>
<li>In IPv6 the IP address size is increased from 32 bits to
128 bits</li>
<li>IPv6 supports a greater number of addressable nodes</li>
<li>IPv6 provides more levels of addressing hierarchy</li>
<li>IPv6 offers simpler auto-configuration of addresses</li>
<li>Ipv6 also supports simplified header format</li>
</ul>
<p>Increasing the IP address pool was a major factor in the
development of IPv6. The biggest benefit of IPv6 is that it
will replace the IPv4 32-bit address scheme with a much
longer 128-bit address scheme. The IPv4 32-bit address
scheme allows for a total of 2^32 addresses while IPv6
allows for 2^128 total addresses.</p>
<p>IPv6 also offers additional technical advantages such
simplified headers in seven fields (instead of the 13
fields in IPv4) as well as improved security with the
addition of two new extension headers (authentication
header and encapsulating security header).</p>
<p>The IETF standards committee, The IPv6 Operations Working
Group (v6ops) is responsible for developing the guidelines
for the operation of a shared IPv4 and IPv6 Internet. The
group also provides operational guidance on how to deploy
IPv6 into existing IPv4-only networks as well as into new
network installations.</p>
</body>

</html>
代码附上,用我老师编的程序检验总是说有indentation 的问题(这是作业,只有用老师的程序验证通过才行),那程序很死板,任何不符合标准的都会报错
这是报错:
The <h1>, <h2>, <ul>, </ul>, <blockquote> and <p> tags should be indented the same
可是我基本都是3空格对应关系啊,到底错在哪里啊
已邀请:

麦皮卡

赞同来自: 酥萌萌 赵平原

唔,首先你用这种方式贴大段的代码别人就算复制下来也难免有差池的,因此也无法准确帮你定位错误所在。因此,这里我推荐一个可以让你自我排查错误的方法。

记住这个网站 http://validator.w3.org/#validate_by_upload

这个网站是负责制定互联网技术规范的国际组织 W3C 提供的一个在线校验工具,可以检测 HTML 和 CSS 的格式与代码是否规范,如果你编写的 HTML 文件可以通过它的审核,那么就是100%标准的。反之,如果无法通过审核,它会给出详细的错误描述供你调试。

至于你们老师编写的校验程序,不客气的说,我认为就是一个自以为是的垃圾。因为居然纠结于代码的缩进是否相同,挺可笑的。不过为了得分,也没法和这种人较劲,解决的办法有两个:

1、找一个好用的代码编辑器,然后设定好“自动缩进”的宽度,比如统一用 tab 或者 space 来缩进。
2、写好代码后,用在线的“代码美化”工具进行重新排版,然后再粘贴回去重新保存一下发给你那个搞笑的老师。比如这个在线工具 http://infohound.net/tidy/ 或者自己搜索“HTML Tidy”,能找到很多相同功能的网站。

韬光剑影18 - 一段往事,一件红衣,微风袭来,红衣飘飘

赞同来自:

谢谢了,已无报错,作业已交。对比教程,代码还是有很多瑕疵的。

要回复问题请先登录注册