Common tags

Commonly used tags:
Title tags: h1~h6. The font size decreases sequentially from h1 to h6.

 

Paragraph tags: p

 

Unordered list: ul
                 List item: li
                 Note: The specification under ul can only write li tags.

 

Ordered list: ol
                 List item: li
                 Note: The specification under ol can only write li tags.

 

Custom list: dl
                     Title item: dt
                     Interpretation item: dd
    Such as:
        <dl>
            <dt>Development language</dt>
            <dd>Java</dd>
            <dd>PHP</dd>
            <dd>Python</dd >
            <dd>C</dd>
        </dl>
    Description: <dd> is actually a list item

 

Emphasis tag: strong

 

Emphasis class italic label: em

 

mark label: mark

 

span tag: without any default style, often used to distinguish styles.

 

img tag: Image tag.
    src attribute: fill in the path of the image.
    The alt attribute defines the content of the image. When the image cannot be loaded and cannot be displayed, the content of the alt attribute will be displayed.
    If the img tag only defines the width attribute, the height of the image will be proportionally displayed according to the actual height.
    If only the height attribute is written, the width of the image will be proportionally displayed according to the actual width.

    vertical-align: top; Indicates that the image is vertically aligned at the top.

 

a tag: link tag.
    href attribute: fill in the link address.
              If the href is filled in the compressed package file. (eg: zip file), the file will be downloaded directly after clicking.
    target attribute: Jump mode.
               _blank-->Open the link address in a new page.
               _self-->Open a new link address on this page. (default value)
The anchor point of the a tag is used: the href attribute value of the a tag is #element ID, then clicking the a tag will directly jump to the element pointed to by this ID.
    For example:
    <style>
        div{
            width: 500px;
            height: 800px;
            background: red;
            font-size: 50px;
            margin: 300px 0px;
        }
    </style>
    <body>
        <a href="#div1">div1</ a>
        <a href="#div2">div2</a>
        <a href="#div3">div3</a>

        <div id="div2">div2</div>
        <div id="div3">div3</div>
    </body>              
    Example 2:
    <a href="other.html#d4">div4</a>
    The code in Example 2 will jump to the element whose ID is d4 in the other.html page when div4 is clicked.
   

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326233939&siteId=291194637