...... . | .... pacing The margin size of the cells in the table, the default value is two pixelscellpadding
The spacing size between cells in the table, the default value is two pixelstr Element
Grammar format:
....
align
Optional values for attribute alignment are as follows: left,center,tight,
defaults to left
bgcolorSpecifies the background color of the row
td element Grammar format:
width" height="height " align=" horizontal alignment" valign="vertical alignment" bgcolor="" background ="" rowspan=" The row span of the cell " colapan=" The column span of the cell">... | align attribute Optional values are: left, center, right valign Optional values for the attribute are: top, middle, bottom rowspan and
colapan
across rows and columns The quantity, the default is 1
Back to topinput element syntax format:
typeThe optional values of the attribute are:
text Single-line text box
Attributes: name Name of the text box
value Initial value of the text box
size Length of the text box
maxlength Maximum length of the input string
radio Radio button
Attributes: name Radio button name
value Internal value
checked Default selected
checkbox check Box
Attributes: name checkbox name
value internal value
checked default selected
reset Reset button
submit OK button
Attributes: name Button name
value Text displayed on the button
password Password box
Properties and text box properties Identical
file File field
Attributes: nameFile field name
size The length of the file field
maxlength The number of characters accepted by the file field Upper limit
hidden hidden domain
Attributes: name hidden domain name
value default value
image Picture domain
Attributes: The button to be represented by name can be submit, reset, or other .
src url address
List box
Grammar format:
Back to top
select element
Syntax format:
name Specify the name of the list box
size Specify the number of list items displayed in the list box. If this parameter is specified, the select element is a list, otherwise It is a drop-down list box
multiple If this parameter is specified, it means that the list box can select multiple items, otherwise only one item can be selected
optionAttribute
Syntax format:
value The value of the list item
selected If this parameter is set, this will be selected by default One item
Back to top
Multi-line text box
Height of text box
wrap
The optional values for the wrapping method of the text box are:
off
Do not save the line wrapping information
physical
Force the browser to send information to the web
server The text in the multi-line text box must be sent line by line,
virtual
to send a continuous string of words unless the user presses Enter.
Back to top
css Cascading Style Sheets
Methods to introduce cascading style sheets include:
External style sheet
Example:
....
Attribute:
rel is used to describe Element is here The task to be accomplished is to connect a standalone css file. The href attribute gives the url address of the css file to be connected.
font105{font:10.5pt;color:blue} --> ....< ;/body>
Element default
Format:
Imported style sheet
〈
html>
....
css’s priority
The closer the style definition is to the target, the higher the priority. High priority styles will inherit the lower priority. Non-overlapping definitions of priority styles but overriding overlapping definitions
If 4 types of style sheets define different styles for the same element, then their priority order from high to low is, element default, inline style sheet, imported style sheet, external style sheet.
css structure
Example: td{font-size:10.5pt;color:#666666}
c The ss style consists of two basic parts,
selector
and declaration {font-size:10.5pt;color:#666666}
The declaration also consists of two parts:
Attributes font size , color and value 10.5pt, #666666
selectors are divided into 6 types
1 element selectors
When on the page When multiple elements have the same style, you can define multiple elements together and separate them with commas. For example: td,p,li,input,select{font-size:12px;}
2class( Class ) selector
Example: 〈head>
....
Scholar-official Jinggangshan District Official
Nine Link Leaving Plan
Another way is to limit the page elements to which it can be applied
Example: 〈head>
....
Scholar-official Jinggangshan District Official
Nine Links Leaving Plan
3 id selector
is similar to class selection, just add '.'Change Into '#'
Example:
#select{font-size:18px;color:#0000ff} -->
T & lt; td align = "center" id = "select" & gt; id select rune & lt;/td & gt; & lt;/tr & gt; & & lt;/table & gt; Replaced with id="" to facilitate the call of page script language
association selector
Associative selector | Associative selector
We set the style of the text contained in the element |
. The style will take effect only when both conditions are met,
Pseudo-class selector can only be used in css
selectors, but cannot be used in
html
selectors in code
Example: 〈 html> ;
The length changes with the size of the browser window
First word
Both of the above can only be applied On block elements
Back to top
css Rules 1.InheritExample: < head>< style type="text/css">
css rules
|