HTML5 01 with Notes

Source: Internet
Author: User
Tags tag name

An HTML is a markup language for making Web sites

Second, the basic HTML syntax

    1. HTML tags

HTML tags are the most basic unit and the most important part of HTML.

Usually start with the sharp corner, < and end >

There are two types of labels (paired and unpaired)

Double label: (paired) < tag name > content </Tag name >

such as:<body></body>

Single label: (unpaired):< tag name/> or < tag name >

such as:<meta/><br/>

Labels are case-insensitive <body> and <BODY> are the same as the recommended use lowercase

HTML tags and attributes are not case-sensitive

2. HTML Tag Properties

HTML attributes typically appear in the HTML start tag as part of the HTML tag

There are attributes in the tag that contain some extra information property values must be double quotes ""

You can have more than one property in a label

The composition of the property: Property name = "Property value"

Syntax format:

Single attribute

< Tag Name Property name = "attribute value" ></tag name >

< Tag Name Property name = "attribute value"/>

Multi-attribute

< Tag Name Property Name = Property Value Property Name = Property Value Property Name = property value ></Label name >

< Tag Name Property Name = Property Value Property Name = Property Value Property Name = property value/>

3.HTML Code format

Any spaces and carriage returns do not play any role in the code.

For typesetting

4. Color settings in HTML

A) All in English: Red green yellow white blue black pink purple .....

b) using a six-bit hexadecimal number

#000000-#ffffff

Please take the # number when you write the color value

5. HTML annotations and document declarations

Features of annotations

A. Comments are not displayed on the browser

B. Annotations to the Code

C. Annotations facilitate team development

D. Annotations are used to quickly restore memory

E. Annotations cannot be nested

Document Declaration

<! DOCTYPE HTML >

6 Theme Structure

7 entities (special characters)

&lt; <

&gt; >

&nbsp; Space

&copy;?

&yen; ¥

&quot; ‘’

8. Head section Element

Title---Represents the header of an HTML document

Meta---Represents the name and content used to define file information

Link---Use this tag when declaring an external resource in a document

Style---When using a stylesheet in a document

Script---When using JavaScript in a document

Base converts a relative address to an absolute address

<!--convert a relative path to an absolute path--

<base href= "http://www.baidu.com" >

Relative path

./css.css

Start with the content of your current location

For example: I'm in the 101 Live room

./Current Location

.. /Parent Directory

Absolute path

Find the tail from the beginning

For example: Earth China Beijing changping Huilongguan Yu Rong Education Park OTO Live Room 101

Http://www.baidu.com

9. Format label

①<br/> Line Wrapping Label

③<p></p> paragraph Labels

④<pre></pre> Display labels in the original format

⑤<li></li> each list label

⑥<ul></ul> unordered List

⑦<ol></ol> ordered list

10. Text Labels

    1. <i></i> Italic Labels
    2. <u></u> Underline labels
    3. <b></b> Font Bold Label
    4. <sub></sub> Subscript Font Labels
    5. <sup></sup> Superscript Font Labels
    6. <em></em> emphasis is usually italic
    7. <strong></strong> emphasis is usually in bold words
    8. <small></small> Small Font Labels
    9. <big></big> Large Font Labels
    10. <tt></tt> Typewriter Fonts

HTML5 01 with Notes

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.