Review common HTML tags and review html tags

Source: Internet
Author: User
Tags code tag

Review common HTML tags and review html tags
I. Introduction to Html
1. Relationship between Html and CSS
1. HTML is the carrier of webpage content
2. CSS styles are manifestations (the things used to change the content appearance are called manifestations)
3. JavaScript is used to implement special effects on webpages (animations and interactions are generally implemented using JavaScript)
2. html tags
<P> </p> is a paragraph label.
Image Tag
3. Tag syntax
1. tags are enclosed by Angle brackets <and>.
2. tags in html are usually paired, with the start and end tags. The end tag is one more/than the start tag /.
3. Labels and labels can be nested, but the order must be consistent.
4. HTML tags are case-insensitive.
4. Understand the basic structure of html files
An HTML file has its own fixed structure.
<Html>
<Head>... <Body>... </body>
</Html>
1. 2. The 3. The content between the <body> and </body> labels is the main content of the webpage.
5. head labels
The document header describes various attributes and information of the document, including the document title. Most of the data contained in the document header is not
Display as content to readers
<Title> tag: the text between the <title> and </title> tags is the title information of the web page, which appears in the title bar of the browser.
The title tag of a Web page is used to tell users and search engines what the main content of a Web page is. Search Engines can quickly determine the subject of a Web page through the web page title. The content of each webpage is different, and each webpage should have a unique title.
6. HTML code comments
<! -- Comment text -->
Ii. Recognize tags
1. Make your webpage better understood by search engines through Semantics
The purpose of a tag: To make it semantic and understand the purpose of each tag,
1. It is easier to be indexed by search engines.
2. It is easier for the screen reader to read the webpage content.
2. <body> label
The content displayed on the webpage is placed here
3. <p> label
Add paragraph
<P> the default style of a tag, which is left blank after the segment. If you do not like the blank style, you can use the css style to delete or change it.
4. Add 6 titles, including h1, h2, h3, h4, h5, and h6.
<Hx> title text 5. <strong> and <em> labels
Emphasize tone: <em> italic by default, and <strong> bold
<Em> text to be emphasized </em>
<Strong> text to be emphasized </strong>
6. <span> label
Set a separate style for text: <span> text </span>
Comparison with em/strong
1. The <em> and <strong> labels are used to emphasize keywords in a paragraph, and their semantics is emphasized.
2. <span> labels have no semantics. They are used to set individual styles.
7. <q> label
Short text reference: <q> reference text </q>
1. "Zhuang Sheng Xiaomeng is a butterfly fan. Hope the emperor has the heart of cuckoo ." This is a poem, from the late Tang poet Li Shangyin's "Jin Se". Because it is not the author's own text, you need to use <q> </q> for reference.
2. Note that no double quotation marks are required for the text to be referenced. the browser will automatically add double quotation marks to the q tag.
Note: The real key point of using the <q> tag is not its default style double quotation marks (if so, we 'd better enter double quotation marks on the keyboard), but its semantics: reference others.
8. <blockquote> tag
Long text reference: <blockquote> reference text </blockquote>
The browser parses the <blockquote> label into an indent style.
9. <br> tag
Branch display text: equivalent to the carriage return in Word documents
Xhtml1.0:
<Br/>
Html4.01 statement:
<Br>
Entering carriage return and space in html code does not work. In html text, if you want to enter a carriage return and line feed, you must enter <br/>.
10. & nbsp;
Space
11. Add horizontal line
Html4.01 version Xhtml1.0 1. The 2. 12. <address> label
Add address information
<Address> address information </address>: The style displayed in the browser is italic.
13. code tag
Add a line of code
<Code> code language </code>
Note: You can use the <pre> label for multiple lines of code.
14. pre Tag
<Pre> language code segment </pre>

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.