Learn web production paragraphs constitute knowledge of web content

Open Notepad, add a new line as follows:

<! DOCTYPE HTML the PUBLIC "- // the W3C // the DTD XHTML 1.0 Strict // EN" 
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<HTML>
<head>
<title> my first website </ title>
</ head>
<body>
this is my first web page and more exciting
</ body>
</ HTML>

Then save the file as a Web page.

Then browser look.

You might expect your page to show you like that type have the same format, divided into two lines, but you will see:

This is my first web page and more exciting

This is because the browser does not focus on how your code is written, it did not care spaces (even if you type "This is my first web page and more exciting", the result is still the same).

Text to be displayed in a different line, you must explicitly stated.

The improved your code below:

<p> This is my first web page </ p>
<p> and more exciting </ p>

p label stands paragraph, i.e. paragraphs.

See the results, these two lines will eventually be displayed in two rows.

The contents of the HTML document should be the same with the book or the article, where appropriate, should be divided into paragraphs. New build a front-end learning qun438905713, most in the group are zero-based learners, we help each other, answer each other, and also to prepare a lot of learning materials, welcomed the zero-based junior partner to the exchange.

Emphasize

In the paragraph tags you can use em and strong tags to emphasize highlight text. They all do pretty much the same thing, although traditionally the browser will be displayed in italics em, bold displays strong.

<P> Yes, that <em> is </ em> I have to say. <Strong> multi </ strong> exciting </ p>

Wrap

Break tag may be used to break into two lines, as follows:

This is my first web page <br /> and more exciting

However, this approach has been seriously abused to divide paragraph, it should not be used in two segments of the text is expected. (What is the structure, what the label on the label what is not to break the line segment and the segment or a line break - translator's note)

(Since there is nothing between the wrap label, so the label is not closed, it is a "/" in the self-closing br.)

Published 50 original articles · won praise 5 · views 30000 +

Guess you like

Origin blog.csdn.net/html168/article/details/104466669