Summary of learning about HTML tags and basic elements

1. Elements and tags in HTML
The element is an inclusive range defined by a single or a pair of tags. A label is a string with a less than sign (<) and a greater than sign (>) on the left and right respectively. The start tag refers to a tag that does not start with a slash (/) and contains a list of allowed attribute-value pairs. The closing tag is a tag that begins with a slash (/). For example:

Connection


2. Four forms of HTML elements
Empty element

Empty element with attributes



Element with contentConnection
Elements with content and attributesConnection
To summarize the above examples

//Start symbol. It can also be parsed if there is no browser

##//Start document header<br>My name is cauthy!/ /Start the title of the document<br>//End the title of the document

//End the head of the document
//Start Document body
Hello World!//Content displayed by the browser
//End document body
//End HTML document

3. Tags related to paragraph control means paragraph, and its function is to create a paragraph. The attribute align indicates the alignment of the segments, which can be leftright justify

indicates linebreak Function: line break
indicates horizontal rule Function: inserts a horizontal line, the attribute indicates color can be used Read green can also use hexadecimal numbers, such as #ffoooo

  静夜思 

静夜思


床前明月光,疑是地上霜。举头望明月,低头思故乡。

4. Tags related to text display
##

: Center the text to display...: used to point out the title of the document, n is an integer from 1 to 6, 1 represents the largest title, the attribute align represents the alignment of the title, which can be center, left right
< ;fontsize=”n” color=””>…: used to set the font, size represents the font size, n can be an integer from 1 to 7, the larger the number, the larger the displayed font.
: Set the text to be bold
: Set the text to be italic

5. How to enter special charactersIn HTML documents, symbols such as non-breaking spaces, carriage returns, HTML reserved words, and some characters that do not exist in the keyboard need to be quoted. There are two types of reference in HTML: character reference and entity reference.
Character references and entity references both start with an & and end with a semicolon (;). If you are using a character reference, you need to add a # after &, followed by the decimal code or hexadecimal code of the required character (the encoding of characters in the ISO 10646 character set). If you are using an entity reference, write the character mnemonic after the &.
In HTML, spaces can be entered using full-width spaces.


6. Comments in HTML


7. Class table - Create a numbered listUse the

    and
  1. tags to create a numbered list. You can use the type attribute to specify the type of numbering system, A (A, B, C), a (a, b, c), I (III III), i (i ii iii) 1 (1, 2, 3) default
    Use the start attribute in the
      tag to set the starting sequence number.
      Use the value attribute in the
    1. tag to change the numbering order in the list.
      Create bulleted lists using the
        and
      • tags. The type attribute in Ul can be, disc (solid circle) square (solid square) circle (empty circle)
        Use
        and
        tags to create unsigned lists, use
        ;Tag substitution
        creates an indented list.
        Use the
        and
        tags simultaneously in the
        element to create a term list. A list item in a term list consists of two parts, the term and its description. The term is specified by the
        tag, and the description is specified by the
        tag.


        1. Mathematics
          Chinese
        2. Physics


        • Mathematics
        • Chinese
        • Physics
          < /ul>

          Mathematics
          Chinese
          Physics
          Chemistry
          ;

          8. Table
          The table uses …< /table>, where border is the width of the table, and the default is 0, which means the width of the table is not displayed.
          : Used to define the title of the table

          : The attribute align specifies the horizontal direction of this row For its method, you can specify the vertical alignment method for leftcenter right .valign, which can be top, middle, bottom
          : used to set the header
          : used to define cells

           表格
          
          ;...
          考试成绩
          语文 数学 英语
          80 70 60
          60 70 80

          9. Form creation

          : The attribute method specifies when sending data to the server The HTTP method used can be the get or post method. Get is the default method. When the get method is used to submit a form, the submitted data is appended to the end of the URL (specified in the attribute action) and sent to the server as part of the URL. For example, we specify the action as reg.asp, When the form is submitted, in the browser address, we will see, http://localhost:8080/reg.asp?user=zhangsan&pwd=1234
          The Post method is to send the information in the menu as a data block To the server, no matter which method is used, the encoding of the data is the same, and the format is: name1=value1&name2=value2
          The attribute action specifies the address of the script that processes the form, that is, after the form is submitted to the server , who will handle it, specify the URL of the handler in the action.
          : type specifies the type of control to be created. The name attribute is used to specify the name of the control. The server-side script that processes the form can obtain the form data represented by the name-value pair. Using the name, the corresponding value can be retrieved. The Name property is not displayed in the form, and the size property is used to set the initial width of the controls in the form. The value attribute specifies the initial value of the control.
          Single-line text input control (type="text") Submit button (type="submit")
          Reset button (type="rest") Password input control (type="password")
          Single Select button (type=”radio”) Check box (type=”checkbox”) Hidden control (type=”hidden”)
          Create multi-line text input
          The following example uses a table to control the form

             表单 
          
          个人简介:
          用户名:
          密码:
          兴趣 足球 篮球
          性别

          10. Hyperlink

          ##...Link textCurrent directory
          < ahref=../”form.html”>The directory one level above the current directory
          Absolute path
          World Wide Web Address

          ##11. Embed image

          replacement text

Continuing Learning
||
表单
个人简介:
用户名:
密码:
兴趣 足球 篮球
性别
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!