HTML base 2 Review

6. Form

6.1 Create a table:

The table <table></table>is defined by a line for each tag <tr></tr>definition, each row is divided into a plurality of cells, the <td></td>defined
data cells can contain text, images, lists, paragraphs, forms, horizontal

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>建立表格</title>
    </head>
    <body>
        <table border="1">
            一列
        <tr>
            <td>100</td>
        </tr>
        </table>
        <table border="1">
            一行三列
        <tr>
            <td>100</td>
            <td>200</td>
            <td>300</td>
        </tr>
        </table>
        <table border="1">
            三行三列
        <tr>![d0def294ed096a8940d8d4e67e557edf.png](en-resource://database/2581:1)
        
            <td>周一</td>
            <td>周二</td>
            <td>周三</td>
        </tr>
        <tr>
            <td>100</td>
            <td>200</td>
            <td>300</td>
        </tr>
        <tr>
            <td>100</td>
            <td>200</td>
            <td>300</td>
        </tr>
        </table>
    </body>
</html>
6.2 Form of the border

In the example above border = "1"is used to set the table border, which forms the border of a predetermined pixel, borderonly control the thickness of the outer border
so we used cellspacingthe thickness, i.e., the property to control the border between the cells and the cell distance
in accordance with the Example: table border = "1" cellspace = "8"
tablethe cellpaddingattribute is used to control the contents of the cell of the distance between the inner boundary to
connect Example:table border = "1" cellspace = "8" cellpadding = "8"

6.3 setting table or cell width and height

widthAnd heightattribute values may be a pixel or as a percentage, if it is not set to default width and height of the content of
connected cases: table border = "1" cellspace = "8" cellpadding = "8" width = "300" height = "300"
<tr></tr>there are heightproperties indicating the height of the line, if the percentage value, it indicates that the table row the total the percentage height
<td></td>also widthattribute indicating a cell where the width of the column, when the percentage is, the percentage of the total row width, said table

6.4 Background to set the table

Table bgcolorattribute table can be used to set the background color
backgroundattribute is used to set the background image setting tables
may be provided in a background of a cell line or separately

6.5 Table border color settings

bordercolorProperty can be set outside the border color of the table

6.6 Location table
6.6.1 horizontal position

alignProperty can be set in a horizontal position form the parent vessel, which is leftor centeror right, i.e., in a horizontal vessel rich home left, center, right of abode

6.6.2 vertical position

valignAttribute is used to control the vertical position of the content in the cell, its value top, middleand bottom, i.e., the content of the cell in the cell vertically home, and the home center, we can control the entire line, a control unit may be grid

6.7 Adding header and title for the table

By <caption></caption>adding labeled form of the title, the title is centered with respect to the table
<th></th> numbers are used to form the header is added, it will replace the corresponding positions of <td></td>marker in the tagged text is displayed in bold and centered within the cell

The combined 6.8 cells
6.8.1 interbank

Interbank i.e. longitudinal merged cell, as long as the provided <td></td>tag rowspanproperties can be achieved, rowspanin a number ranging from

6.8.2 Across Columns

I.e. across the cell columns consolidated laterally disposed only <td></td>tag colspanproperties can be achieved, colspanin a number ranging from

Form 7

Form using the form tag <form name = "" method = "" action = ""></form>
attribute "name" for form a name; "method" attribute is used to set the transmission data. There are two values, "post" and "get", "action" attribute specifies the name of the server-side processing program, that is, when clicking the "Submit" button submitted address.
Interview:
POST: the data submitted to the address bar is not displayed, relatively safe; data length is no limit on the address bar
get: defaults to get submitted, the data will be displayed on the address bar, insecurity; on the address bar length limited data
used form element

7.1 input element input
7.1.1 text field

<input type="text" name="" value="" size="" maxlength="" readonly="readonly(只读)">
type="text"Claim Form line text box element is
namea text box named
valueset the initial contents of the text box, the text does not fill the space
sizeof the text box display the length of
maxlengththe maximum number of characters of the input text box

7.1.2 password input box

The typevalue of the property goes passwordto
<input type="password" name="pss"/ maxlength="10">

7.1.3 checkbox

The typevalue becomes the property radioto achieve
<input type="radio" name="" checked value="女"/>女
valuedata submitted along with the
checkeddefault selected item

7.1.4 check box

<input type="checkbox" name="" value=""/>
valueFollowed by the data submitted

7.1.5 submit button

<input type="submit name="" value=""
valueName displayed on the display button

7.1.6 Reset button

<input type="reset" value=""/>

7.1.7 push button

<input type="button" value=""/>

7.1.8 Picture button

<input type="image" src="路径"/>
Function and submit the same button, the form can be submitted

7.1.9 Hidden Field

<input type="hidden" name="" value=""/>
Page can not see the field, but it will be submitted along with the form to be submitted

7.1.10 file field

<input type="file" name=""

7.2 drop-down box
<select name="">
    <option selected="selected"></option>
</select>
More than 7.3-line text box

<textarea name="" row="行数" cols="列数"></textarea>Do not mark the end of the line feed

8. framework

frameset (frameset, substituted body) common attributes

rows="": Setting a frameset each frame occupies size
cols="": setting a frameset each frame occupies size
border="": setting frameset border thickness
bordercolor="": setting a frame border color set
frameborder="": Set if there is no border, 1 0

frame common attributes

noresize="noresize ": Set the frame can not be any drag
src="": The framework introducing path to the page
name="": framework named, target =" frame name "
scrolling="no|yes": The framework does not allow whether to allow scrolling on behalf of no scrolling, yes representatives allowed to roll

8.5 floating frame

<iframe></iframe>: It can be used as a label in html

8.5.1 floating frame common attributes

src="": The introduction path floating frame page
width="": Width of the floating frame is provided
height="": setting the height of the floating frame
scrolling="": the frame is allowed to scroll the representative scroll allowed no, yes allowed to roll on behalf of
frameborder="": is provided if there is no border, 1 0
name="": to take a frame name
align="": horizontal alignment set frame

Guess you like

Origin www.cnblogs.com/wuliqqq/p/11279306.html