JAVA Web day01 --- the first day of Study Notes for Android, day01 --- android
HTML 1. HTML Overview 1.1. HTML Introduction
L HTML (Hyper Text Markup Language): hypertext Markup Language.
> A tag is a tag.
> HTML is not a programming language, but a markup language.
L role:
Is used to write web pages.
1.2. HTML writing specifications
A) Create. HTML
You can use a text editor to create an html or htm extension.
Because windows does not support more than three extended names, and later gradually improved, html AND htm are essentially the same.
It can be parsed and browsed by IE (browser.
B) Structure of. HTML
<Html>
<Head>
<Title> </title>
</Head>
<Body> </body>
</Html>
C). Html tag Specification
* Html is composed of a pair of keywords enclosed by Angle brackets. Example: <title>
* HTML is usually paired with a start tag and an end tag. Example: <title> </title>
Special cases:
Empty HTML Tag. Example: <br/>
* HTML tags generally have attributes. Attribute format: attribute name = "attribute value" can be double quotation marks, single quotation marks, or no quotation marks. We recommend that you use quotation marks. Example: <font color = "blue" size = '22' face = Lishu> really clear </font>
* HTML can be nested. (Only package Nesting is allowed, and cross Nesting is not allowed)
* HTML is case-insensitive. We recommend that you use lower case 2, HTML basic tags (link tags, table tags) 2.1, file tags
L
Declared that this document is an HTML document.
Wrapped the entire HTML file
L
Description on the webpage.
The content in it is not displayed.
L <title> tag
It is the title of a webpage.
L <body> label
Responsible for displaying the page
The content in it is displayed.
* Attributes:
> Text: Set the text color in the body label.
> Background: Set the body background image
> Bgcolor: Set the background color of the body to 2.2.
L <br/> label
* Is a line feed.
L
* Is a space.
L HTML comment
* Format: <! -- Comment content -->
L <p> label
* Is a paragraph label. Add a line after the beginning of the paragraph
* Attributes:
> Align: sets the paragraph alignment.
L
* Is a horizontal line.
* Attributes:
> Color: sets the color of the horizontal line.
> Size: Set the width of the horizontal line.
> Width: Set the length of the horizontal line.
Extension:
1. HTML length settings (learn more)
Pixel: width = "6" or width = "6px"
Percentage: width = "80%". It will change 2.3 as the browser changes, block labels
L <div>
Set a block area in the document
Block-level elements (automatic line feed)
L <span>
Set a block area in a row
Inline element (do not wrap automatically)
Most HTML elements are block-level elements or Inline elements 2.4. Font labels
L <font> label
* Set the font size, color, and font type.
* Attributes:
> Color: Set the font color.
> Size: the font size ranges from 1 to 1 ~ 7
> Set the font type for face.
L title label
* H1 ~ H6
* Maximum h1 and minimum h6
L italic and bold labels
<I> </I>
<B> </B> 2.5. List tags
L ordered list (ol tag)
* Attributes
> Type: set the project sequence number of the ordered list. A, I, 1
> Start: Set the start value of the project sequence in the ordered list.
L unordered list (ul tag) (commonly used)
* Attributes:
> Type: set the project label of the unordered list.
L list items (li tags) 2.6, image tags
L
* Attributes:
> Src: Set the image import path (commonly used)
> Alt setting replaces the text of the image (commonly used)
> Width: Set the image width.
> Height: sets the Image height.
> Border: Set the image frame width.
> Align: sets the alignment of an image (not recommended). 2.7. Link label (emphasis)
L <a>
* If you want to implement a jump link, you must have content. Example: <a> content </a>
* Attributes:
> Href set the link path (frequently used)
Intranet access: relative or absolute path
Internet access: http protocol is required. Example: http://www.baidu.com
> Name: Set the anchor (commonly used)
Use with herf
Set the anchor. The a tag can have no content.
> Target: locate the resource opening location.
Generally, it can be used with the Framework.
For example, <a href00000000xx.html "target =" top "> open </a>
<Frame name = "top"/>
It is opened in the framework named top. 2.8. Table labels (key points)
L table labels
* Table, used to define a table
L line label
* Tr, used to define rows in a table
L cell tag
* Td, used to define a cell.
* Th is used to define a header cell. Center bold by default
* Td and th attributes:
> Colspan column merge
> Rowspan row merge
L table title label
* Caption, used to define a table title
* It must be followed by the table label.
L group tags
* Grouping rows in a table
* Thead defines the table header. Only one
* Tbody defines the table body. One or more
* Tfoot defines the table footer. Only one
* If a row is defined outside the group tag, the row belongs to the TBODY by default.
* If group tags are used, they must be used together. Otherwise, they will not work.
Download Branch:
You can control the download of table branches to increase the download speed.
Add <tbody> and </tbody> to the branch Download Area.
3. HTML form tags (emphasis)
Purpose: form is used to submit user input data 3.1 and form labels.
* <Form> defines a form.
* Common attributes:
> Action specifies where to send form data when a form is submitted. (Submitted to this page by default)
Submit to the Internet: http protocol is required,
Example: http://www.baidu.com
Submit to Intranet: relative path and absolute path
> Method specifies how to send form data
There are two types of HTML:
Post and get
The default value is get.
Interview Questions:
What is the difference between form submission post and get?
1. When the get method is submitted, the parameters are displayed in the address bar.
Parameters are not displayed in the address bar during post submission. (In the request body)
2. The get method is insecure.
Post Sensitive Information Security
3. Submit in get mode. The official submission size is limited to 1 kb (but most browsers can submit 2 kb)
Submit in post mode to submit Big Data
Send form data in get mode:
On the address bar :? Parameter Name 1 = parameter value 1 & parameter name 2 = parameter value 2
Send form data in Post mode:
3.2 In Request body, input tag
* Input: defines an input form item to receive user input information.
* Attributes:
> Type: specifies the type of the input tag.
Text Box. The entered text is displayed in the box.
Password. The input text is displayed as the origin or Asterisk. Non-plaintext
Single-sector radio, for example, gender selection.
Check box checkbox, for example, interest selection.
The submit button submit is used to submit the content in the form.
Reset button reset to set the content in the form to the initial value
A text box and a browser button are automatically generated for the extended content of the file in the attachment box. Example: Photo
The hidden field hidden is not displayed on the page, but is submitted along with other content. Example: User ID
A button can be used to customize events.
Image is an image submission button. Used to beautify the submission button. When you submit the form data, the mouse clicks the coordinates of the image to encapsulate it. Rarely used
> Name is used to specify the name of the input item. That is, the parameter name.
> Value is used to specify the value of an input item. Parameter Value
> Checked is used to set the default check box for single-choice or multi-choice. Checked is selected by default.
> Src: When type = "image", this attribute is used to introduce image 3.3 and select box labels.
* Select, which defines a selection box
* Attributes:
> Name is used to specify the name of the selected item. That is, the parameter name.
> Multiple is used to set the selection box to multiple selection forms.
* Option: defines an entry in the selection box.
* Attributes:
> Value is used to specify the value of the selected item. Parameter Value
If the value attribute is not set, the content body of the <option> label is submitted by default.
> Selected is used to set the default selection of the Selection box. If the value is selected, the 3.4 and text field labels are selected by default.
* Textarea: defines a text field input box.
* Attributes:
> Name is used to specify the name of the text field, that is, the parameter name.
> Cols defines how many columns the text field displays
> Rows defines how many lines a text field displays.
Difference from <input type = "text"/>:
1. text fields can wrap, but text boxes cannot.
2. The value of the text field is written in the content body, and the value of the text box is in the value
Job: Use table and form to write a registration form together. (Nested table with form)
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">