HTML Learning Notes 1-html Basics

Source: Internet
Author: User

First, the basic structure of HTML

<title> Title </title> title Tag

<body> Page Display Area

</body> page display area (tail)


Double Tags: starting and ending in pairs, such as

Single label: A slash has a space between the element behind the label and the elements, such as

Inline elements, inline labels: labels on the same line display will not wrap

Block-level Labels: Each label is displayed on its own line

Second, HTML control of the format of the tag

(1) .< tag name > single type, no set value. such as: <br/>

(2) .< tag name attribute = "attribute value" > single type, with set value. such as:

(3) .< tag name >...</tag name > symmetric type, no set value. such as:<title>...</title>

(4) .< tag Name attribute = "attribute value" >...</tag name > symmetric type, with set value.

such as: <body bgcolor= "Red" >...</body>

<palign= "Center" >...</p>

Three, the most commonly used control mark

1. Title Text settings

Format:

It is a total of 6 heading levels, the first title is the largest, and the level 6 headings are minimal. Default Bold display

Property Name Property Value Description

Align left aligned

Center Center alignment

Right aligns

Justify Justify

For example: Set level Two title to align Right:

2. Paragraph <p>

Format: <p align= "Arrangement" > Paragraph content </p>

Property Name Property Value Description

Align left text aligned (default)

Center text alignment

Right aligns text

Justify text Justify

For example: Set paragraph to center alignment: <P align= Center > paragraph Center Alignment </p>

3. NewLine <br> format: <br/> No property setting function: Force line wrapping

4. Horizontal line

Format:

Property Name Property Value Description

Size pixels Specifies that the greater the height (thickness) attribute value of the HR element, the thicker the line

Width pixel absolute settings, length does not change with the window changes

Percent relative set, length varies with window width

NoShade noshade Specifies that the color of the HR element is rendered as a solid line

Align Left HR element aligned (default)

Center HR Element Text alignment

Right HR element text justified

Color sets the colors of a horizontal line

For example: Set the width of the horizontal line to 60% of the window, align to the left, height to 10, solid line, Green

5. Format: Background color and text settings

<body bgcolor= "Background color" text= "Text color" >

Margins for the overall page

<body leftmargin= "left margin" rightmargin= "right Margin"

topmargin= "Top margin" bottommargin= "bottom margin" >

6. Text Display format

Format: <font size= "Font size" face= "font type" color= "Font Color" ></font>

Property Name Property Value Description

Size 1~7 absolute settings, set the font size to X

+1~+6 relative settings, set the original font size to the new font by +x

-1~-6 relative settings, set the original font size to the new font via-X

Color sets the colors of text

Face set font for text

Text default is 3rd, the text size of 1th, the smallest, 7th, the largest

7. Special character settings

Special characters &nbsp; (space) to add a semicolon after writing a special character;

Format: <: &lt;

: &gt;

&: &amp;

": & quot;

Space: &nbsp;

Copyright icon: &copy;

8.HTML Note (note) Format:<!--comments--

9. Entity Character Control tags

<b>...</b> Bold Body

<i>...</i> Italic

<s>...</s> Delete Lines

<u>...</u> Underline

<sub>...</sub> subscript

<sup>...</sup> superscript

10. Semantic character Control

<address>...</address> Address

<del>...</del> Delete (strikethrough)

<ins>...</ins> Modify (underline)

<strong>...</strong> enhanced Tone (bold)

<em>...</em> enhanced Tone (tilt)

11. Formatting

Format:<pre>...</pre>

Let the written text format! Formatting tags reserved in HTML format recognition manual spaces and line breaks are seldom used

12.<blockquote> Indent labels </blockquote> can be nested, indent multiple times

This article is from the "Raffaele" blog, make sure to keep this source http://raffaele.blog.51cto.com/6508076/1553022

HTML Learning Note 1-html Basics

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.