attributes, paragraphs, headings, line breaks, and so on in HTML

Source: Internet
Author: User
Tags unique id

Properties of HTML
The properties of the HTML tag always appear in the form of a name/value (name= "value");
Attributes are always specified in the start tag of the HTML element;

1, the HTML link is defined by the <a> tag, the URL is specified in the href;
<a href= "www.baidu.com" >this a link</a>

2, the title of the alignment;
<H1 align= "Center" >this is a test exampleAlign Properties: center Center, left-aligned, right-aligned;

3, <body bgcolor= "Yellow" > </body>
The bgcolor property sets the background color;

4. <table> defines the table:
<table border= "1" > Set the border of the table;

Properties of some elements:
Property Value Description
Classclassname the class name of the specified element (classname)
ID ID Specifies the unique ID of the element
Stylestyle_definition inline style for the specified element (inline style)
TitleText additional information for the specified element (can be displayed in tooltips)

The title of the HTML:
The title of HTML is defined by tags such as

Note: By default, HTML automatically adds an extra blank line before and after a block-level element, such as a paragraph or a heading element.

<HR/> Tags create horizontal lines in HTML;
The HR element is used to separate content;


<!--This is a comment--> write down comments in such a way that the readability of the code is increased;

HTML paragraph:
Define paragraphs by <p> tags;
<p>this is a paragraph</p>
<p>this is another paragraph</p>
Note: The browser automatically adds a blank line before and after the paragraph. <p> is a block-level element;
Tip: Using an empty paragraph mark <p></p> to insert a blank line is a bad habit. Replace it with a <br/> tag! (But don't use the <br/> tag to create a list.) Do not worry, you will learn the HTML list later in the space. )

If you want to wrap (a new line) without creating a new paragraph, use the <BR/> Label:
<p>this is<br/>a para<br/>graph with line breaks</p>

HTML output-Useful hints
We cannot determine the exact effect of HTML being displayed. The size of the screen, as well as the adjustment of the window, can result in different results.
For HTML, you cannot change the effect of the output by adding extra spaces or line breaks in the HTML code.
When a page is displayed, the browser removes extra spaces and blank lines from the source code. All contiguous spaces or blank lines are counted as a single space. Note that all consecutive empty lines (line breaks) in the HTML code are also displayed as a single space.

Example:

<body bgcolor= "Yellow" >

<H1 align= "Center" > Life

<!--this is a comment-->

<p> every day I come from the gift of the world, with Thanksgiving heart, dare not slack, dare not waste! </p><br/><p>my First paragraph.</p>

<p> <br/> Millions disaster encounters <br/> I have been held <br/> Willing to understand the true meaning of the Buddha </p>

<p>
Spring sleep does not feel Xiao,
Birds are heard everywhere.
Night comes the sound of wind and rain,
How much does the flower fall to know.
</p>

<p> Note that the browser ignores the layout in the source code (omitting extra spaces and line breaks). </p>

<a href= "www.baidu.com" > This is a link </a>


<p/>

</body>

attributes, paragraphs, headings, line breaks, and so on in HTML

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.