HTML basic summary
1. H1-h6 label
They are all title tags, which define the title of a paragraph. H1 is the largest, decreases successively, and H6 is the smallest
The title label is used to make the text bold
2. Paragraph label: P label
Used to display a piece of text (picture), which ignores the typesetting in the source code
Block element: an element that monopolizes a row and cannot share the same row with adjacent elements. All block elements have the align attribute, and h1-h6 and P elements are block elements
3. Format label:
B label: bold text
Del tag: contains text with a horizontal line in the middle
EM label: the text of the package is displayed in italics
I label: the text of the package is displayed in italics
Pre tag: displays the layout of the source code
Strongtag: like em, it has the meaning of emphasis. If you want to emphasize a paragraph of text, it is recommended to use the strongtag
U label: underline text
Sup: defines superscript text
Sub: define subscript text
4. Picture label img, which is used to display pictures on the web page
Required attribute: 1 SRC: the path of the picture (relative path or absolute path can be used, but absolute path is not recommended)
ALT: defines the alternative text when the picture cannot be displayed
Relative path: take the location of the current file as the reference path, and the defined path is called relative path
Absolute path: the physical path of the file on the hard disk is called absolute path,
For example:
D: \ work \ 20181129java class \ courseware \ 01 web front end courseware \ web-day1 \ code \ web-day1 \ img \ tly jpg
Optional properties:
1. Title: the prompt text when the mouse is placed on the picture. All elements have a title attribute
2. Width: defines the width of the picture. The default unit is pixel px. The unit can be omitted
3. Height: defines the height of the picture
Br tag: line feed tag, which can be written as or
Hrlabel: horizontal line label, which can be written as
5. Span: usually used to decorate text. You can add styles to it, such as style = "color: red;"
Div: divide the document into several independent parts, block level elements
6. UL defines an unordered list, and the type attribute defines the tag of the list item. The default is disc
Type = "disc" default black dot
Type = "circle" hollow dot
Type = "square" box
Ol defines a sequence table, and the type attribute defines the tag of the item. The default is number
Type = "a" or "a": indicates uppercase or lowercase letters
Type = "I" or type = "I": indicates Roman capital letters or Roman lowercase letters
Border: defines the border properties of the table
Cellspacing: the distance between cells. If it is set to 0, there is only 1 border
Cellpadding: the distance between the contents of the cell and the border
Header: the first row in the table, which is used to display column headings. Use th to define each column in the header, and display the contents in bold and centered
TD (table data cell) represents each column of the data row
Align = "center": center the table as a whole
Align = "center" of tr (table row): make the contents in the row be displayed in the center
Caption: defines the title of the table, which is equivalent to the center of the table
ColSpan: span columns, that is, merge cells horizontally. The value is the number of cells to merge
Rowspan: cross row, that is, merge cells vertically. The value is the number of cells to be merged
Form: form tag, which is used to create a form, collect the data entered by the user and submit it to the server program
Attribute: Action: specifies which server program to send the data of the form to
Method: specify the method to submit data. Common values include get and post. The default value is get
Form field: also known as form element, it is used to collect the data entered by users and submit it to the server-side program
Common form fields: 1 Input element: its type attribute has different values and shows different forms
"Text": represents a text box and provides text input
"Radio": radio box (radio button). The name values of multiple radio boxes must be the same. If the names are different, they cannot be mutually exclusive. The value value is submitted when submitting
Check box. When the name is the same, you can submit multiple values (the value of the value attribute)
File field, allowing users to select local files to upload to the server
Hidden fields, elements invisible to users, can have default values and can be submitted to the server (hidden fields will be widely used in Java EE Development)
2. Select element: represents a drop-down list, also known as a drop-down box. In the drop-down list, use the option element to define the options to be selected. By default, the first option is selected,
Set an option to be selected: add selected = "selected" or selected on the option element
Set the drop-down list to multi selection drop-down list: add multiple attribute to the select element
Settings for the selected element:
Set whether the radio box or check box is checked
Set an option in the drop-down list. The selected attribute is selected
Body label:
1. Background: defines the background picture of the web page. If the background picture is very small, it will be automatically tiled horizontally and vertically
2. Bgcolor: defines the background color of the web page
Textarea: text field, also known as multi line text box. Cols is the width in the text area, and rows: the number of lines
Placeholder: used to set the default prompt text in a single line text box (not textarea). When new content is entered, the prompt text disappears
Label: it has no effect. When used in combination with radio buttons or check boxes, if the for attribute of label is the same as the ID of the button, click
Form button:
1. Submit button: send the form data to the server specified in action
2. Reset button: data clearing
3. Normal button: forms cannot be submitted without adding JS code
Frameset: frame set, which is used to divide the entire browser window into multiple small windows. Each small window is called a frame. Each small window (frame) can load an independent HTML document
The cols or rows attribute defines how to split the entire large window,
Cols: defines the percentage of each frame divided horizontally,
Rows: defines the percentage of each frame divided in the vertical direction,
NoResize: cannot adjust the width or height of the frame. FrameBorder = "0": remove the frame's border
*Represents the remaining percentage, which will be calculated automatically
SRC refers to the relative path of the web page loaded by the frame
. Iframe: an inline framework that can contain other documents (web pages). Inline is inline, because it can share the same line with adjacent elements
Width: width, height: height
FrameBorder: border. 0 or no means no border
Boutique java learning video