1. body of related content
Table 1.1 Tags: table, tr, td
HTML form a <table> tag and one or more <tr>, <th> or <td> tags.
<Table>: parent tag, the entire table corresponding to the container.
border: the width of the table border.
width: width of the table.
cellpadding: the gap between the edge of the cell and its content.
cellspacing: blank between the cells.
bgcolor: background color of the table.
<Tr>: tag is used to define the line.
<Td>: tag table for defining the cell (column)
colspan: Number of columns of cells can span.
rowspan: cell number of rows spanned.
align: cell content horizontal alignment values: left left, right and right, center center.
nowrap: whether the contents of the cell wrap.
<Th>: tag defines the header. Default content is centered within the cells, bold.
Example 1:
< HTML > < head > < Meta charset = "UTF-. 8" /> < title > </ title > </ head > < body > <-! . 3. 3 * table, and setting the width edges, and shows one pixel edge -> < Table border = ". 1" width = "400px" cellpadding = "0" cellspacing = "0" > < TR > < TH > . 1 title </ TH > <TH > 2 Title </th> <th>3标题</th> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table> </body> </html>
Example 2:
<html> <head> <meta charset="utf-8"/> <title></title> </head> <body> <!-- 3*3表格,将第一行全部合并 --> <table border="1" width="400px" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" bgcolor="#ddd">a</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table> </body> </html>
Example 3:
<html> <head> <meta charset="utf-8"/> <title></title> </head> <body> <!-- 3*3表格,将第一列全部合并 --> <table border="1" width="400px" cellpadding="0" cellspacing="0"> <tr> <td rowspan="3" bgcolor="#ddd">1</td> <td>2</td> <td>3</td> </tr> <tr> <td>5</td> <td>6</td> </tr> <tr> <td>8</td> <td>9</td> </tr> </table> </body> </html>
1.2 Frame Tag: frameset
<Frameset> tag, a plurality of windows in a set of pages together (frame set). Each page (frame) are individual documents, required child tags <frame> to determine the location of the page. <Frameset> to determine the overall layout, cols determined using the number of columns, number of rows determined by the use of rows of columns and rows. A plurality of <frameset> can be nested.
<Frameset> and <body> two can not coexist.
rows and cols attribute property values: value 1, value 2 and value 3, ...... represents a value of a row (column), using multivalued comma separated value can be 10px, 10%, etc., if the last value * matches do not want to be calculated using the remaining amount.
<Frame> tag is used to set <frameset> set a page frame (frame).
src attribute: determine the path of the page.
noresize properties: first partition frame can not be moved.
The target property: Determine the need to display the page display where they are.
Example:
<html> <head> <meta charset="utf-8"/> <title></title> </head> <frameset rows="15%,*"> <frame src="top.html" name="top" /> <frameset cols="15%,*"> <frame src="left.html" name="left" /> <frame src="right.html" name="right" /> </frameset> </frameset> </html>
1.3 Form Tags: form
<Form>: form tag, create a form in html pages, forms no label is displayed on the browser. If you need to submit data to the server, responsible for collecting tag data must be stored in a form tag body content.
action attribute: path requests, form submission is determined the location (path) to the server.
The method attribute: mode request. Common values: GET, POST.
GET: defaults
Additional data submitted in the request path. For example:? / 1, html username = xhh & password = 1234, the data format of k / v, an additional connection is used, after each use of the data connection &?.
Because of the limited length of the path request, the data of GET requests submitted limited.
POST:
Submit request additional data is no longer on the route (and not displayed in the address bar).
The size of the data submitted does not show.
< HTML > < head > < Meta charset = "UTF-. 8" /> < title > </ title > </ head > < body > <-! Form -> < form Action = "" Method = "" > <! - content here may be submitted to the server -> </ form > <! - content in herein> external tag <form, where the data can not be submitted to the form -> </ body > < / HTML >
1.3.1 Input field label: input
<Input> tag for obtaining user input information, a different value of the type attribute, collected in different ways. The most commonly used labels.
type properties
text: text box, a single line of input fields, the user can enter text. The default width is 20 characters.
password: password box, the password field. The characters in the field are shown in black circles.
radio: radio button to indicate a set of mutually exclusive options buttons. When a button is selected, previously selected button becomes a non-selected.
submit: Submit button. Submit button will send the form data to the server. Generally do not write that property, otherwise it will "submit" word submitted to the server.
checkbox: check box.
file: file upload component that provides the "Browse" Press to select the file you want to upload.
hidden: hidden fields. Data will be sent to the server, but not the browser for display.
reset: reset button. Forms will be restored to their default values.
image: Graphic submit button, the button to set the src to the picture.
button: push button, used to have JavaScript combination.
name: element name, if you need to submit the form data to the server, you must provide a name attribute value, the server obtains data submitted by property values.
property value: Set default values of the input tag. submit data and display reset button.
size: size.
checked property: radio button or check box is selected.
readonly: Whether read-only.
disabled: is available.
maxlength: maximum length allowed input.
1.3.2 Label drop-down list: select
<Select>: drop-down list. May be selected from single or multiple. Need to use child tags <option> specified list item.
The name attribute: name of the server to send.
multiple attributes: Do not write radio default, the value is "multiple" represents a multiple choice.
size properties: multiple choice, the number of visible options.
option sub-labels: drop-down option (one entry) in the list.
selected: Check the current list item.
value: the value of the option is sent to the server.
1.3.3 text field label: textarea
<Textarea>: text field. Multi-line text input control.
cols attributes: number of columns in a text field.
rows attributes: the number of lines of text fields.
1.3.4 Button Tags: button
<Button type = "button | reset | submit">: button labels rarely use, "provides general | reset | submit" feature, different browsers default.