Html Study Notes 4, html Study Notes

Source: Internet
Author: User
Tags html header

Html Study Notes 4, html Study Notes

<Span style = "font-size: 18px;"> <span style = "font-size: 18px;"> hyperlink: </span>
<Span style = "font-size: 18px;"> <span style = "font-size: 18px;"> 1 <a> label </span>
<Span style = "font-size: 18px;"> <span style = "font-size: 18px;"> Syntax: <a href = "link jump address"> link text </a> </span>
<Span style = "font-size: 18px;"> <span style = "font-size: 18px;"> example: <a href = "http://www.baidu.com"> Baidu Knows it </a> </span>
<Span style = "font-size: 18px;"> <span style = "font-size: 18px;"> 2. hyperlink target attribute syntax <a href = "link jump address" target = "open mode"> link text </a> the value of the target attribute. _ Self is the default method, that is, to open the link in the current window <open the link in a new blank window> open the link in the previous layer of the current framework 3. A hyperlink can be an internal link or an external link. An internal link refers to the link object of a hyperlink as a resource in the same website. Links related to your website pages are called internal links. The example of "hyperlink a tag" is an external link. The link object of this hyperlink is an external website. The link object of the internal link is another page of the website or the current page. <Title> hyperlink internal link </title> </span> <a href = "webpage 2. aspx "> jump to webpage 2 </a> <a href =" test \ webpage 3. aspx "> jump to webpage 3 </a> </span>
4. Introduction to the anchor Link
An anchor is an internal link. The link object is a part of the current page.
Some web pages are too long due to a large amount of content. Visitors need to drag the scroll bar on the browser to view the content in the document.

<Span style = "font-size: 18px; "> <div> <a href =" # music "> recommended music </a> <br/> <a href =" # movie "> recommended movies </a> <br/> <a href = "# article"> recommended articles </a> <br/> </div> </span>

You need to set two parts for the anchor link: one is the id of the target anchor and the other is the hyperlink.

Id is the name of the element, which is the same as the name attribute. The difference is that name is the standard in HTML, and id is the standard in XHTML. The name attribute is rarely used in web pages of web2.0, but the id attribute is used. In the same page, the id is unique, that is, a page cannot contain the same id.

Form
Creating a form looks like creating a table. The rows, columns, and cells of the table are all placed in the <table> label, and the method for creating a form is the same as that for creating a table. If you want to create a form, you need to put the various labels of the form inside the form tag <form>.
Syntax:
<Form> various form labels </form>
1. form attributes: name: used to distinguish form from id. action: used to process the Request method for submitting a form. Two methods are available: get and Post. enctype: the default encoding method for application/x-www-form-urlencoded; for multipart/form-dataMIME encoding, This value must be selected for the form "Upload File. Target: Same as the attribute of the <a> label.
2. Differences between form submission Get and Post

1. get is to get data from the server, and post is to send data to the server. 2. get is to add the parameter data queue to the url referred to by the action attribute of the submission form. The values correspond to each field in the form one by one and can be seen in the url. Post uses the http post mechanism to place fields in the form and their content in the html header and send them to the url address referred to by the action attribute. You cannot see this process. 3. For the get method, the server uses Request. QueryString to obtain the value of the variable. For the post method, the server uses Request. Form to obtain the submitted data. 4. The data volume transmitted by get is small and cannot exceed 2 kb. The amount of data transmitted by post is large, which is generally not restricted by default. Theoretically, the maximum size of IIS4 is 80 KB, and that of IIS5 is 100KB. 5. Low get security and high post security. However, the execution efficiency is better than the Post method. Suggestion: 1. The get method is more secure than the Post method. If it contains confidential information, we recommend that you use the Post data submission method. 2. We recommend that you use the Get method for data query; we recommend that you use the Post method when adding, modifying, or deleting data;
Reference: http://zhidao.baidu.com/link? Url = Response

3. Form object:

There are three types of form objects:

<Select> and <option>, <input>, <textarea>

① Input tag

Type attribute value of input


There are three attributes of text: value, size, and maxlength.

Syntax:

<Input type = "text" value = "default text" size = "text box length" maxlength = "Maximum number of input characters"/>

The attribute values of password are also value, size, and maxlength.

Radio

Syntax:

<Input type = "radio" name = "group name of the radio button" value = "value of the radio button"/>

• Checkbox

Example:

<Span style = "font-size: 18px;"> <span style = "font-size: 18px;"> <! DOCTYPE html> 

• Normal button
Common buttons are usually implemented with JavaScript scripts.
Syntax:
<Input type = "button" value = "normal button value" onclick = "JavaScript script program"/>
Note:
The value is the text displayed on the button, and onclick is a normal button event.

Submit (submit) reset (reset)

• Image

<Input type = "image" src = "image path"/>

• Hide the hidden domain

<Input type = "hidden"/>

• File

<Input type = "file"/> <input type = "file"/> enctype = "multipart/form-data"

② Multi-line text box

<Textarea rows = "number of rows" cols = "Number of columns"> multi-row text box content </textarea>

③ Drop-down list

<Select> <option> used together

• <Select> label attribute description
Multiple is an optional attribute. Only one attribute value is "multiple ". By default, only one option can be selected in the drop-down list. When multiple = "multiple" is set, multiple options can be selected in the drop-down list.
Number of items visible after the size drop-down list is expanded

• <Option> label attribute description

Value option value
Select or not


3. Multimedia

Use the <embed> label to insert audio and video files and flash files.

Syntax: <embed src = "multimedia file address" width = "playback interface width" height = "playback interface height"/>

• Background Music:

You can set background music for a webpage using the bgsound tag. Bgsound is used to insert background music, but it is only applicable to IE browsers and may not be used in Firefox.

Syntax:<Bgsound src = "background music address" loop = "playback times"/>

4. Floating frame iframe

<Iframe src = "floating frame source file" width = "floating frame width" height = "floating frame height"> </iframe>

We can use the scrolling attribute to control the scroll bar of the floating frame iframe. Scrolling attributes can be displayed as needed, always, or not.

Auto default value. The entire table is left aligned on the browser page.
Yes always displays the scroll bar. The position of the scroll bar is reserved even if the page content is insufficient to cover the frame range.
No. the scroll bar is not displayed under any circumstances.






Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.