Work hard to learn how to make Web pages the paragraph of the content of the page

Source: Internet
Author: User
Tags closing tag
Web page

Open Notepad and add a new line as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<title> My first page </title>
<body>
This is my first page, how exciting.
</body>

Then save as a Web page file.

Then look in the browser.

You might expect your page to show up in two lines as you type, but you'll see:

This is my first page, how exciting.

This is because browsers don't pay attention to how your code is written, nor do you care about spaces (even if you type "This is my first page is exciting", the result is the same).

To display the text in a different line, you must clearly point out.

Follow the instructions below to improve your code:

<p> This is my first page </p>
<p> how exciting </p>

The P tag represents paragraph, which is the paragraph.

Looking at the results, the two lines will eventually appear in two lines.

The content of an HTML document should be the same as a book or an article, and the paragraph should be divided where appropriate.

Emphasize

In the paragraph you can use the EM tag and the strong tag to emphasize the highlighted text. They all do almost the same thing, although traditionally browsers display em in italics, showing strong in bold.

<p> Yes, that <em> is </em> what I'm going to say. <strong> more </strong> exciting </p>

Line Wrap

A newline label can be used to break into two lines, like the following:

This is my first page <br/> more exciting

However, this method has been grossly abused to divide the paragraph, and it should not be used in the two paragraphs of the expected paragraph. (What is the structure, what labels should be used with what label, not to break the break or break the paragraph for the break-the translator note)

(since there is nothing between the line-wrapping labels, there is no closing tag, it is closed with "/" after Br.) )



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.