1,the definition of HTML
- The Hypertext Markup Language (hypertext Markup language,html) marks individual parts of the page to be displayed in a label language . A set of rules, a browser-aware rule
- The browser renders the Web page file sequentially, and then interprets and displays the content based on the marker. However, it is important to note that for different browsers, the same label may not have the exact same interpretation (compatibility)
- Static Web page File extension:. html or. htm
2,the structure of HTML
-
<! DOCTYPE Html> tells the browser what HTML or XHTML to use to parse the HTML document
-
-
The
-
<title></title> defines the page title, which is displayed in the browser title bar.
-
The text between <body></body> is visible on the page body content
3.HTML tag format
4.commonly used tags in
meta tag :<meta> elements provide meta-information about the page (meta-information), descriptions and keywords for search engine and update frequency.
Meta tag composition: Meta tags have two attributes, which are the Http-equiv property and the Name property, and different properties have different parameter values, these different parameter values to achieve a different page function.
(1) Name attribute: Mainly used to describe the Web page, the corresponding property value of content,content content is mainly for the search engine to find information and classification information.
<meta name= "keywords" content= "meta Summary, HTML Meta,meta properties, meta jump" > <meta name= "description" content= " The old boy training institution was created by a very old boy ">
(2) Http-equiv property: equivalent to the file header of HTTP, it can send back some useful information to the browser to help correctly display the content of the Web page, the corresponding property value of Content,content is actually the variable value of each parameter.
5. Commonly used tags in <body>Basic Label(Block-level labels (blocks) and inline labels (inline))
" the value range of n is 1~6; From big to small. Used to represent a title. (block) <p>: paragraph label. The contents of the package are wrapped. And there is a blank line between the contents. (block) <b> <strong>: Bold label. <strike>: Add a median line to the text. <em>: text becomes italic .<sup> and <sub>: Top and bottom corner tables . <br>: line break. <HR>: Horizontal Line Special characters: < >"©® "
<div> and <span>
<div></div>: <div> is just a block-level element that has no practical meaning. It is mainly given a different performance by CSS styles.
<span></span>: <span> represents inline rows (inline elements) and has no practical meaning, and is mainly given a different representation by CSS styles.
The difference between a block-level element and an in-line element
The so-called block element is the element that begins to render on another line, and the inline element does not require a different line. If you insert these two elements separately in a Web page, you will not have any effect on the page.
These two elements are specifically designed to define a CSS style.
graphic Tags:
"'src: The path to display the picture . alt: The picture does not load successfully when prompted. Title: The message when hovering the mouse. Width: The width of the picture: the height of the picture (two properties of the width height only one will be automatically scaled.)
hyperlink tag (anchor tag): <a> </a>
A hyperlink is a link from a Web page to a target, which can be another page, a different location on the same page, a picture, an e-mail address, a file, or even an application.
the URL is the abbreviation for the Uniform Resource Locator (Uniform Resource Locator), also known as the Web address, which is the address of the standard resource on the Internet. http://www.sohu.com/stu/intro.html "protocol + domain + path" http://222.172.123.33/stu/intro.html"protocol +ip address + path"
"' <a href=" "target=" _blank ">click</a>href property specifies the destination page address. The address can have several types: absolute URL-point to another site (such as href= "http://www.jd.com) relative URL-refers to the exact path in the current site (href=" index.htm ") anchor URL- Point to the anchor in the page (href= "#top")
List Label
"' <ul>: unordered list [Type property: Disc (solid dot) (default), Circle (Hollow Circle), Square (solid Square)] (Unorder list)
<LI>: Each item in the list. <OL>: Sequence list (order list) <li>: .<dl> definition list for each item in the list (define list) <dt> List title (define title) <dd> list item (define data) "
Table Tags: <table>
A table is a two-dimensional data space, a table consists of several rows, a row and a number of cells, cells can contain text, lists, patterns, forms, digital symbols, preset text and other tables and other content.
The most important purpose of the table is to display the table class data. Tabular data refers to data that best fits into a tabular format, which is organized by rows and columns.
The basic structure of the table:
<table> <tr> <td> title </td> <td> title </td> </tr> < tr> <td> content </td> <td> content </td> </tr></table>
Property:
"' <tr>: Table row<th>: Table head cell<td>: Table Data cell property: border: Table border. cellpadding: Inner margin cellspacing: margin. Width: Percentage of pixels. (preferably with CSS to set the length and width) rowspan: How many rows the cell spans vertically colspan: how many columns (i.e. merged cells) the cells span ‘
Form Tags: <form> (very IMPORTANT!!!) )
features: Forms are used to transfer data to the server, enabling users to interact with the Web server
The form can contain input series labels such as text fields, checkboxes, radio boxes, submit buttons, and so on.
Forms can also contain textarea, select, FieldSet, and label labels.
Form Properties
Action: Where the form is submitted. Generally point to the server side of a program, the program receives the form submitted by the data (that is, the form element value) for the corresponding processing, such as Https://www.sogou.com/web
Method: Form submission method post/get; default value is get
Form elements
Basic concepts:
HTML forms are a more complex part of HTML elements, and forms are often combined with features such as scripting, dynamic pages, and data processing, so it's important to make dynamic Web sites.
Forms are typically used to collect user input information
How the form works:
When a visitor browses a page with a form, they can fill in the necessary information and then press a button to submit it. This information is transmitted over the Internet to the server.
This data is processed by a specialized program on the server and returns an error message if there is an error and requires that the error be corrected. When the data is complete and correct, the server feeds back an input completion information
<input> Series Labels
' <1> form type
Type: text input box password password input box radio single box checkbox multiple Box Submit button button (need to use with JS.) What is the difference between button and submit? file submission: Form form needs to add attribute enctype= "multipart/form-data" upload file note two points: 1 The request must be in the post 2 enctype= "multipart /form-data "
<2> Form Properties
Name: The key of the form submission item. Note the difference from the id attribute: The name attribute is the one used when communicating with the server , and the id attribute is the name used by the browser side, which is primarily for client programming, and value used in CSS and javascript: The value of the form submission item. The Value property is used differently for different input types: type= "button", "Reset", "submit"-defines the displayed text on the button type= "text", "Password", " Hidden "-Defines the initial value of the input field type=" checkbox "," Radio "," image "-defines the value associated with the input checked: Radio and checkbox are selected by default readonly: Read-only . Text and passworddisabled: works well for the input used.
Select Label
' <select> drop-down tab Property name: The key of the form submission item. Size: Number of options Multiple:multiple <optgroup> for each item plus group <option> drop-down check each property: value: The values of the form submission item. Selected:selected dropdown selected by default "'
<textarea> Multi-line text box
"' <form id=" Form1 "Name=" Form1 "method=" Post "action=" "> <textarea cols=" width "rows=" height "name=" name "> Default content </textarea></form> "'
<label> tags
Define the:<label> label to define the callout (tag) for the INPUT element.
1 The Label element does not present any special effects to the user.
2 The For property value of the <label> tag should be the same as the id attribute value of the related element.
"' <form method=" post "action=" "> <label for=" username "> user name </label> <input type=" text "Name=" username "id=" username "size=" "/></form>"
<fieldset> tags
"<fieldset> <legend> login </legend> <input type=" text "></fieldset>"
HTML Knowledge Express