HTML basics summary recommendation (paragraph)

HTML basics summary recommendation (paragraph)

HTML Paragraph

Paragraphs are defined by the <p> tag.

Examples

<p>This is a paragraph</p>
<p>This is another paragraph</p>

Tip: Forgetting to use a closing tag can produce unexpected results and errors.

The align attribute of <p> is deprecated in HTML4/5. Please use CSS instead. Paragraphs support event attributes and global attributes

Text alignment within a paragraph

<!DOCTYPE html>
<html>
<head>
<style>
h1 {text-align:center;}
p.date {text-align:right;}
p.main {text-align:justify;}
</style>
</head>

<body>

<h1>CSS text-align example</h1>
<p class="date">March 14, 2015</p>
<p class="main">"When I was young, I dreamed of changing the world. When I grew older, I found that I could not change the world, so I shortened my sights and decided to change only my country. When I entered my twilight years, I found that I could not change our country. My last wish was just to change my family. But, that too could not happen. Now, as I lie on my bed, dying, I suddenly realize: If I had just changed myself first, then I might have changed my family. With their help and encouragement, I might have done something for my country. Then, who knows? I might even have changed the world."</p>
<p><b>Note:</b> Resize your browser window to see how &quot;justify&quot; works. </p>
</body>
</html>

grammar
<p align="left|right|center|justify">

Property Value

描述
left 左對齊文本。
right 右對齊文本。
center 居中對齊文本。
justify 對行進行伸展,這樣每行都可以有相等的寬度(就像在報紙和雜志中)。

HTML line breaks

If you want a line break (new line) without creating a new paragraph, use the <br /> tag:

Examples

<p>This is<br>a para<br>graph with line breaks</p>
The <br /> element is an empty HTML element. Since a closing tag doesn't make any sense, it doesn't have a closing tag.

Tip: <br> tags are very useful when writing address information or poetry. Note: Use the <br> tag to enter a blank line instead of breaking a paragraph. Note: HTML output - Use caution as we cannot determine exactly how the HTML will be displayed. The size of the screen and the resizing of the window may lead to different results. With HTML, you cannot add extra spaces or line breaks in the HTML code to change the output. When displaying a page, the browser removes extra spaces and blank lines from the source code. All consecutive spaces or blank lines are counted as one space. It is important to note that all consecutive blank lines (newlines) in HTML code are also displayed as one space. <html>

<body>
<h1>Spring Dawn</h1>
<p>
I sleep through the spring without knowing the dawn,
Birds can be heard everywhere.
The sound of wind and rain at night,
How many flowers have fallen?
</p>
<p>Note that browsers ignore the typography in the source code (eliminating extra spaces and line breaks). </p>
</body>
</html>

Output

Spring Dawn

I slept through the spring without knowing the dawn, and heard birds singing everywhere. There was a sound of wind and rain at night, and I wonder how many flowers have fallen.

Note that browsers ignore typography in the source code (eliminating extra spaces and line breaks).

The above HTML basic summary recommendation (paragraph) is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

Original URL: http://www.cnblogs.com/sxtywjx/archive/2016/07/13/5665124.html

<<:  The whole process of installing gogs with pagoda panel and docker

>>:  Detailed introduction to the MySQL installation tutorial under Windows

Recommend

svg+css or js to create tick animation effect

Previously, my boss asked me to make a program th...

How to convert rows to columns in MySQL

MySQL row to column operation The so-called row-t...

Mysql splits string into array through stored procedure

To split a string into an array, you need to use ...

Detailed application of Vue dynamic form

Overview There are many form requirements in the ...

Detailed explanation of the update command for software (library) under Linux

When installing packages on an Ubuntu server, you...

Floating menu, can achieve up and down scrolling effect

The code can be further streamlined, but due to t...

Methods and techniques for designing an interesting website (picture)

Have you ever encountered a situation where we hav...

Semanticization of HTML tags (including H5)

introduce HTML provides the contextual structure ...

Using JS to implement binary tree traversal algorithm example code

Table of contents Preface 1. Binary Tree 1.1. Tra...

MySQL query tree structure method

Table of contents MySQL query tree structure 1. A...