can someone please point out all errors in this HTML please?

2008-12-04 2:46 pm
<HTML>
<HEAD> <TITLE> My Web Page</HEAD>
<P>
<H2>About ME <H1>
<P>
I was born in <H8> North Carolina</BOLD> <BR>
I attend high school in <BOLD> Wake County.</BOLD> <BR>
My favorite class is <BOLD> Computer Applications II <BOLD>
<HR>
<C><B>Teachers at my school include the following: </B></C>
<UL>
<L1>Jason White
<L2>Suanne Cole
<L3> B. J. Matthews
</UL>
<HR> </HR>
My favorite places to visit are:
<LI>New York
<LI>Nags Head
<LI>Myrtle Beach
</OL>
<Italics>This page was created by Joe Nelsonia</Italics> </H8>
</HTML>
</BODY>

回答 (7)

2008-12-04 3:02 pm
✔ 最佳答案
The document should have a DOCTYPE set at the beginning and this is missing.

The Title tag is not closed.

Opening <BODY> tag missing.

There are headings within paragraphs. This is not structurally correct

<BOLD> is not a tag, it should be <B> but this is a depreciated tag, consider using <STRONG> instead.

The H8 in front of "North Carolina" is inappropriate. A heading in the middle of a sentence wrong.

<C> is not a valid HTML tag

The numbers within the <LI> tags are wrong and the <LI> tags should be closed.

The horizontal rule <HR> does not need a closing tag.

The opening Ordered List <OL> tag is missing

<Italics> is not a valid tag, it should be <i> although this tag is depreciated and the <em> tag should be used to place emphasis around a word. CSS should then be used to apply the underline.

Structurally, there should also be Heading tags around "Teachers at my school....", and "My favourite places to...". They don't need to have heading tags but the fact that you have them bolded suggests a heading and headings should use the H tags and not just presentational tags such as <B> which has no semantic meaning.

Closing </BODY> and </HTML> tags need to be swapped in order, </HTML> must appear last.



The document should look like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>My Web Page</TITLE>
</HEAD>
<BODY>
<H1>About ME</H1
<P>I was born in <STRONG>North Carolina</STRONG>. <BR>
I attend high school in <STRONG>Wake County.</STRONG> <BR>
My favorite class is <STRONG>Computer Applications II </STRONG></P>
<HR>
<H3>Teachers at my school include the following: </H3>
<UL>
<LI>Jason White</LI>
<LI>Suanne Cole</LI>
<LI> B. J. Matthews</LI>
</UL>
<HR>
<H3>My favorite places to visit are:</H3>
<OL>
<LI>New York</LI>
<LI>Nags Head</LI>
<LI>Myrtle Beach</LI>
</OL>
<EM>This page was created by Joe Nelsonia</EM>
</BODY>
</HTML>
2008-12-04 10:51 pm
It's riddled with errors, including no DOCTYPE. I'm afraid you need to do your own homework.

However, the HTML validator may help you.

http://validator.w3.org/
2008-12-04 10:50 pm
umm...

you don't have an opening body tag....

e.g. -
<BODY>...


also you seem to have a H8 heading tag..... they only go up to H6...

I'd suggest you use this.,...

<HTML>
<HEAD> <TITLE> My Web Page</HEAD>
<P>About ME
<H1>
<P>
I was born in North Carolina
</BOLD> <BR>
I attend high school in <BOLD> Wake County.</BOLD> <BR>
My favorite class is <BOLD> Computer Applications II <BOLD>
<HR>
<C><B>Teachers at my school include the following: </B></C>
<UL>
<L1>Jason White
<L2>Suanne Cole
<L3> B. J. Matthews
</UL>
<HR> </HR>
My favorite places to visit are:
<LI>New York
<LI>Nags Head
<LI>Myrtle Beach
</OL>
<Italics>This page was created by Joe Nelsonia</Italics>
</HTML>
</BODY>
2008-12-06 3:20 pm
dear god...............

anyway.... this is how it should be:


(BTW, all of the new and fixed codes are lower case so you can see the differences)

(whatever doctype)

<HTML>
<HEAD> <TITLE> My Web Page</title>
</HEAD>
</body>
<P>
<h1>About ME </H1>
<P>
I was born in <b> North Carolina</b> <BR>
I attend high school in <b> Wake County.</b> <BR>
My favorite class is <b> Computer Applications II </b>
<HR>
<B>Teachers at my school include the following: </B>
<UL>
<li>Jason White</li><br>
<li>Suanne Cole</li><br>
<li> B. J. Matthews</li><br>
</UL>
<HR>
My favorite places to visit are:
<ol>
<LI>New York</li><br>
<LI>Nags Head</li><br>
<LI>Myrtle Beach</li><br>
</OL>
<i>This page was created by Joe Nelsonia</i>
</HTML>
</BODY>

(btw, wtf is with that <c> code??? I took that out!)

Okay...... its okay but you should add some color, css, and <Center> tags to it, but never use <marquee> or <blink>

Good Luck!
2008-12-05 3:06 am
I believe you're using the wrong tags. You might want to go through http://www.w3schools.com/ to re-learn your tags.

Here's how it should look like:

<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>About Me</h1>

<p>I was born in <b>North Carolina</b>.<br>
I attend high school in <b>Wake County</b>.<br>
My favorite class is <b>Computer Applications II</b>.</p>

<p><b>Teachers in my school include the following:</b>
<ol>
<li>Jason White</li>
<li>Susanne Cole</li>
<li>B.J. Matthews</li>
</ol></p>

<p><b>My favorite places to visit are:</b>
<ul>
<li>New York</li>
<li>Nags Head</li>
<li>Myrtle Beach</li>
</ul></p>

<p style="font-style:italic;">This page was created by Joe Nelsonia</p>

</body>
</html>

2008-12-04 10:50 pm
when I save this to a text file and rename the extension to .html and display it in my browser I see no errors.....becareful about displaying too much personal info on the net
2008-12-04 10:49 pm
<LI>Myrtle Beach, lol, me too!
i dont see anything wrong with it....


收錄日期: 2021-05-03 14:31:16
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20081204064612AAa5lM8

檢視 Wayback Machine 備份