HTML Basics (tables and forms)

Source: Internet
Author: User

1.3. Table with Forms 1.3.1, Forms

<table></table> Forms

Width: wide. Can be expressed in pixels or percentages. Commonly used 960 pixels.

border: Border. Common value 0.

CellPadding: The margin between the content and the cell border. Common value 0.

cellspacing: The spacing between cells. Common value 0.

Align: Alignment.

bgcolor: Background color.

Background: Background image.

<tr></tr> Line

Align: horizontal alignment of the contents of a row

valign: Vertical alignment of the contents of a line

Height: Row Height

bgcolor: Background color

Background: Background image

<td></td> cell

<th></th> header, cell contents are automatically centered, bold

Align: How the contents of a cell are aligned

valign: Vertical alignment of the contents of a cell

Width: Cell width

Height: Cell Height

bgcolor: Background color

Background: Background image

The contents must be placed in the cell, the cell must be in the row, and the row must be placed in the table. When you set the row height and sizing of a cell, the corresponding row or column is affected at the same time

Cell Merging: (It is recommended to use table nesting as far as possible)

Colspan= "n" merges the same row of cells (followed by the code to subtract the corresponding column)

Rowspan= "n" merges the same column cell (minus the corresponding column starting from the second row)

1.3.2, Forms

<form id= "" Name= "" method= "Post/get" action= "the server Responsible for processing" > ID is not repeatable; name repeatable; get commit has a length limit, and the encoded content is visible in the address bar, post submission no length limit , and the content is not visible after encoding.

</form>

1. Text input

text box <input type= "TXT" name= "" id= "" value= ""/>

Password box <input type= "password" name= "" id= "" value= ""/>

Text field <textarea name= "" id= "" cols= "" (Number of characters) rows= "" (a few lines high) ></textarea>

Hidden fields <input type= "hidden" name= "" id= "" value= ""/>

2. Button

Submit button <input type= "Submit" Name= "" id= "" disabled= "Disabled" value= ""/> Click to go to the address of the submission server within the form

Reset button <input type= "reset" name= "" id= "" disabled= "Disabled" value= ""/>

Normal button <input type= "button" name= "" id= "" disabled= "Disabled" value= ""/>

Picture button <input type= "image" Name= "" id= "" disabled= "Disabled" src= "Picture address"/>

Report:

Disabled, make the button invalid; Enable to make available.

3. Select input

radio button Group <input type= "Redio" name= "" checked= "Checked" value= ""/> name is used for grouping; Value value is not visible, is submitted to the program; checked, set default options.

check box group <input type= "checkbox" Name= "checked=" checked "value=" "/>

File upload <input type= "file" name= "id=" "/>

<lable for= "" ></lable>

The <label> tag defines the callout (tag) for the INPUT element.

The label element does not present any special effects to the user. However, it improves usability for the user of the mouse. This control is triggered if you tap text inside a LABEL element. That is, when the user selects the label, the browser automatically shifts the focus to the label-related form controls.

The For property of the <label> tag should be the same as the id attribute of the related element.

Drop-down list box

<select name= "" id= "" size= "" multiple= "multiple" >--size=1 when it is a menu; >1 is a list. Multiple is a multi-select.

<option value= "value" > Content 1</option>

<option value= "Value" selected= "selected" > Content 2</option>--selected, set as Default

<option value= "value" > Content 3</option>

</select>

HTML Basics (tables and forms)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.