2-1 Start Learning <p> Labeling

Source: Internet
Author: User

(1) Start learning <p> Labeling

If you want to display the article on the page, then you need to <p> tag, the passage of the article into the <p> tag.
Grammar:

<p> paragraph text </p>


Note that a <p> tag for a text, such as 3 paragraphs in a news article, you should put these 3 paragraphs into 3 <p> tags. As shown in.




<p> The default style of the tag, you can see in the paragraph before the paragraph will be blank, if you do not like the blank, you can use CSS style to delete or change it.


The code is as follows:

<! DOCTYPE html>

(2) Learn

The passage of the article with <p> tags, then the title of the article with what label? In this section we will use There are 6 title tags, h1, H2, H3, H4, H5, H6 respectively for the first-level title, two-level title, three-level title, four-level title, five-level title, six-level title. and decreases on the basis of importance. Grammar:




Default style for H1-h6 tags:


Styles to display in the browser:




From the above picture can see the title label style will be bold, H1 label font size is the largest, H2 label size relative H1 to small, and so on H6 label the smallest font size.


The code is as follows:

<! DOCTYPE html>

(3) Add accent tone, use <strong> and <em> tags
With the passage and the title, now if you want to highlight a few words in a paragraph, you can use the <em> or <strong> tags.
But there is a difference between the two in the tone of emphasis,:<em> stressed that,<strong> expressed a stronger emphasis. And in the browser <em> by default in italics,,<strong> is indicated in bold. Two tags compared to the current domestic front-end programmers prefer to use <strong> to emphasize.
Grammar:
<em> text to emphasize </em>
<strong> text to emphasize </strong>
For example, in the online shop, the price after the discount of a product needs to be emphasized. Such as.



Code implementation:
<div class = "P-price" >
<span> Buying Price:</span>
<strong>$40.00</strong>
</div>


The contents of <em> are shown in italic,<strong> as bold in the Browse. If you don't like this style, it doesn't matter, you can use CSS styles to change it later.


Code implementation:




Code:

<! DOCTYPE html>





2-1 Start Learning <p> Labeling

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.