Professional Documents
Culture Documents
HTML FAQs Part 2
HTML FAQs Part 2
HTML FAQs Part 2
You can use <TABLE ALIGN="right"> to float a table to the right. (Use ALIGN="left"
to float it to the left.) Any content that follows the closing </TABLE> tag will
flow around the table. Use <BR CLEAR="right"> or <BR CLEAR="all"> to mark the end
of the text that is to flow around the table, as shown in this example:
<FORM ACTION="[URL]">
<TABLE BORDER="0">
<TR>
<TH>Account:</TH>
<TD><INPUT TYPE="text" NAME="account"></TD>
</TR>
<TR>
<TH>Password:</TH>
<TD><INPUT TYPE="password" NAME="password"></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" NAME="Log On"></TD>
</TR>
</TABLE>
</FORM>
<div class="center">
<table>...</table>
</div>
div.center {
text-align: center;
}
div.center table {
margin-left: auto;
margin-right: auto;
text-align: left;
}
The short answer is that the form should just have one <INPUT TYPE=TEXT> and no
TEXTAREA, though it can have other form elements like checkboxes and radio buttons.
<script type="text/javascript">
document.myform.myinput.focus();
</script>
A similar approach uses <body onload=...> to set the focus, but some browsers seem
to process the ONLOAD event before the entire document (i.e., the part with the
form) has been loaded.
You can also use a CSS style sheet to affect all the forms on a page:
form { margin-bottom: 0 ; }