Fourth HTML form in-depth understanding, annotation and the use of a tag

Source: Internet
Author: User
Tags html form

Form insights, annotations, and the use of a tagsComments , the format of comments in HTML:Start < end of!----Example: <!--<div> I've been annotated </div>--this comment can have multiple lines of comments, and if there is only a comment at the beginning and no end comment, all the following comments from the beginning will be all is commented out, you can also click on a row with the mouse to press the shortcut key "Ctrl +/" comment, you can also select multi-line annotation.  the use of annotations: The invalid code is commented out, perhaps it will be useful in the future or consider two development, so do not delete, but choose comments out, the source code is not Chinese, the use of annotations can also be a Chinese explanation, remind yourself, here is how to do, tell others here is what modules and ideas.  commented out code, the program will not run, so it does not affect the speed of the program, but commented out of the code, it still exists, in the file, the memory will not be smaller, such as you write a login page, this file size 10KB, even if you will comment out all the code inside, the file size is still 10KB.  Drill-down forms:
<formAction="#"Method= "POST">    <P>        <!--when logged in, it is generally used in the user name -Text:<inputtype= "text"/>    </P>    <P>        <!--when you log in, you usually use the password -Password:<inputtype= "Password"/>    </P>    <P>        <!--in personal information, the general choice of your hobbies, personality, etc., multi-choice -Check: Apple<inputtype= "checkbox"/>Watermelon<inputtype= "checkbox"/>    </P>    <P>        <!--the name value of the radio must be consistent in order to be classified into a class of radio -Radio: Male<inputname= "Gender"type= "Radio"/>female<inputname= "Gender"type= "Radio"/>    </P>    <P>        <!--Hide text box, it exists, but invisible -        <inputtype= "hidden"/>    </P>    <P>        <!--Drop- down list, we'll also use this to do three-tier floating, such as China's provinces, cities, counties -Drop- down list:<Selectname= "Xiala"ID= "Xiala">            <optionvalue= "Eyes">Eyes</option>            <optionvalue= "Smile">Smile</option>            <optionvalue= "Mouth">Mouth</option>        </Select>    </P>    <P>        <!--you will use this when you comment or publish, similar to the text box, but it is more appropriate to write text content -multiple lines of text:<textareaname= "text"ID= "text"cols= "+"rows= "Ten"></textarea>    </P>    <P>        <!--it is to submit the entire form form, get the input select textarea inside the form and then go to the address that the action points to -Submit button:<inputtype= "Submit"/>    </P></form>
in the form, the "name" appearing in the label is its name, and if it is transmitted to the background for verification, the background gets its data by name, and value is its value.  the above form of the label, almost can be used in all the login, registration, personal information and other places, in the HTML5 also extended a number of property values, here do not explain, interested students can go to the handbook to see.  the use of a label!  the notation of a label:
<href= "http://www.baidu.com"> Baidu </a  >
in the case of a network, will jump to the Baidu page, "href" is the point of the address, a tag can not without it, access to local pages, then changed to the name of the file can be, such as: <a href= "my.html" > My </a> to note that, Your file location, directory to be under one level.  again an A-tag for the use of the anchor, it is often used in the site, when browsing to the middle section or the bottom of the time, you can click on it, back to the top, then the procedure is very simple:
<DivID= "Top"style= "Height:600px;background-color: #d6e9c6">I am the top</Div><Divstyle= "Height:600px;background-color: #b2dba1">I am the middle content</Div><ahref= "#top">Back to Top</a>
in this we use CSS style, set the height of the div to 600px, and the background color. Give the top div an ID, and a tag point to this ID, #代表本页, do not do other page jumps, #top is on this page to find top, so you can return to the top, is the anchor point of practice.  

Fourth HTML form in-depth understanding, annotation and the use of a tag

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.