HTML Markup Basics

Source: Internet
Author: User
Tags closing tag

The only thing that the browser can recognize is that html,html is a structured markup language that is used to mark text, images, audio, and video on a Web page, with 114 tags currently in HTML, but in accordance with the 80/20 principle, 25 of them can be used to meet our daily work needs.

Label mode

There are two ways to label content, according to what is included is not text, tag closed tags and non-closed tags

Text with closed tags
< Tag name attribute 1 = "attribute value" Property 2 = "attribute value" > text content </ tag name >

Text elements such as headings, paragraphs, and so on must use closed tags, that is, must have open and closed tags

Referencing content using closed tags

< Tag name attribute 1 = "attribute value" Property 2 = "attribute value" />

Non-textual content is displayed through a self-closing tag.

The difference between closed and non-closed labels: the contents of the closed tag are the actual content that will be displayed, and the non-closed tag contains a reference. Does not directly display the content, needs the browser to do the extra action

<src= "Pic/android-arrow-back.png"  alt= "This is a pic"/ >

The above tagged a picture, using the self-closing tag, when the browser loads, it needs extra looking at the Pic/android-arrow-back.png picture

Property

Property provides additional information about the label, half of it is used to control the text content or to describe the source of the reference content, such as

<src= "Pic/android-arrow-back.png"  alt= "This is a pic" />

Attribute Src describes the source of the picture, Alt is used when the picture does not load properly, the content is displayed, each HTML tag can add attributes, and the class and ID attributes can be added to almost any label

HTML Markup Basics

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.