How do I add more info below a form

S

Shumit

Newbie here. If u have a look at my code you will see the problem -
everything I add after I close my form still goes into it.
Thanks in advance.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>Test</title>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">

</head>
<body>
<center><h1>Email Test</h1></center>
<hr>
<form method="post" action="">

<center><table border="1" bgcolor="#FFDAB9">
<tr>
<td bgcolor="#A0522D" style="border-style: none;"><font
color="#ffffff"><b>Test</b></font></td>

</tr>
<tr>
<td style="border-style: none;"><center><table summary="Input fields
table">

<tr>
<th align="right"><label for="email">E-mail</label>:</th>
<td><input type="text" name="email" size="40" id="email" /></td>
</tr>

<tr>
<td colspan="3" align="center"><button type="submit"
id="button">Continue</button></td>
</tr>

</table></center>
</form>

How do I get this text outside the form?
</body>
</html>
 
C

Chris F.A. Johnson

Newbie here. If u have a look at my code you will see the problem -
everything I add after I close my form still goes into it.

1. Provide a URL
2. Use HTML 4.01 strict, not transitional
3. In the sample below, you don't have any text outside the
form.
 
J

Jukka K. Korpela

Scripsit Chris F.A. Johnson:
1. Provide a URL
Agreed.

2. Use HTML 4.01 strict, not transitional

Agreed. And don't mix XHTML with HTML 4.01. (The sample uses XHTML
3. In the sample below, you don't have any text outside the
form.

Well, that's debatable:

The text "How do I get this text outside the form?" is surely meant to
be outside the form. But technically, the document is invalid, so
rigorously speaking it is not an HTML document at all and all
discussions about HTML elements in it are meaningless. But in practical
terms, the document opens two <table> element and closes only one of
them, as a validator like http://validator.w3.org would tell. And
there's an unclosed <center> too.

Adding </table></center> before </form> fixes this.
 
H

Harlan Messinger

Shumit said:
Newbie here. If u have a look at my code you will see the problem -
everything I add after I close my form still goes into it.
Thanks in advance.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<title>Test</title>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">

</head>
<body>
<center><h1>Email Test</h1></center>
<hr>
<form method="post" action="">

<center><table border="1" bgcolor="#FFDAB9">
<tr>
<td bgcolor="#A0522D" style="border-style: none;"><font
color="#ffffff"><b>Test</b></font></td>

</tr>
<tr>
<td style="border-style: none;"><center><table summary="Input fields
table">

<tr>
<th align="right"><label for="email">E-mail</label>:</th>
<td><input type="text" name="email" size="40" id="email" /></td>
</tr>

<tr>
<td colspan="3" align="center"><button type="submit"
id="button">Continue</button></td>
</tr>

</table></center>
</form>

How do I get this text outside the form?
</body>
</html>

You started your form, then began a table, then inside one of the
table's cells you began a second table that you closed just before
closing the form, but when you closed the form, the original table was
still in progress and you never closed it. More briefly: you began the
table inside the form, but never ended it. Write nonsense, get nonsense!

HTML elements need to be either mutually exclusive or nested. They can't
simply intersect--you can't have

<aaa><bbb></aaa></bbb>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top