Basic HTML summary & lt; Section & gt;, basic html Summary section

Source: Internet
Author: User

Basic HTML summary <Paragraph>, basic html Summary section
HTML section

The section is defined by the <p> label.

Instance <p> This is a paragraph </p>
<P> This is another paragraph </p> prompt: unexpected results and errors may occur if you forget to use the end tag.

The align attribute HTML4/5 of <p> is obsolete. Use CSS instead. Section supports event attributes and global attributes

 

Text alignment in 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 instance <P class = "date"> March 14, 2015 </p>
<P class = "main"> "when I was young, I dreamed of changing the world. When I became mature, I found that I could not change the world, I shortened my eyes and decided to change my country. When I entered the twilight years, I found that I could not change our country, my last wish was to change my family, but it was impossible. When I was lying in bed, I suddenly realized that, if I only changed myself at first, then I could change my family. With the help and encouragement of my family, I may do something for my country. Who knows? I may even change the world ." </P>
<P> <B> Note: </B> Reset the browser window size to view how the window & quot; justify & quot; works. </P>
</Body>

</Html>

Syntax <p align = "left | right | center | justify"> Attribute Value
Value Description
Left Align text to the left.
Right Right-aligned text.
Center Align text in center.
Justify Stretch rows so that each row can have an equal width (as in newspapers and magazines ).

HTML line breaks

If you want to wrap a line (New Line) without generating a new paragraph, use the <br/> label:

Instance <p> This is <br> a para <br> graph with line breaks </p>

<Br/> the element is an empty HTML element. Because closing a tag does not make any sense, it does not end the tag.

Tip: The <br> label is very useful when writing address information or poetry.
Note: Use the <br> label to enter empty rows instead of section separation.
Note: HTML output-usage reminder
We cannot determine the exact effect of HTML display. Screen Size and window adjustment may lead to different results.
For HTML, you cannot add extra spaces or line breaks to HTML code to change the output effect.
When the page is displayed, the browser removes unnecessary spaces and blank lines from the source code. All consecutive spaces or empty rows are counted as one space. Note that all consecutive blank lines (line breaks) in HTML code are displayed as a space.

<Html>

<Body>

<H1> Chunxiao

<P>

Xiaoxiao,
Birds are everywhere.
Night storms,
How much is spent.
</P>

<P> note: the browser ignores the layout in the source code (Omitted spaces and line breaks ). </P>

</Body>

</Html>

Output: Chunxiao

Spring sleep knows it, and birds are everywhere. The amount of rain and rain in the night is unknown.

Note that the browser ignores the layout in the source code (Omitted spaces and line breaks ).

 
 

 

 

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.