HTML Learning Note One

Source: Internet
Author: User

HTML is a language used to describe a Web page.
    • HTML refers to Hypertext Markup Language (Hyper Text Markup Language)
    • HTML is not a programming language, but a markup language (markup language)
    • Markup language is a set of tag tags (markup tag)
    • HTML uses tag tags to describe web pages
HTML tags

HTML tag tags are often referred to as HTML tags (html tag).

    • HTML tags are keywords surrounded by angle brackets, such as
    • HTML tags are usually paired up, such as <b> and </b>
    • The first label in the pair is the start tag, the second is the end tag
    • Start and end tags are also known as open tags and closed labels
HTML document = Web page
    • HTML Document Description Web page
    • HTML documents contain HTML tags and plain text
    • HTML documents are also called Web pages

The purpose of a Web browser is to read HTML documents and display them as Web pages. Instead of displaying HTML tags, the browser uses tags to interpret the contents of the page:


Example explanation
    • Text description page between
    • The text between <body> and </body> is visible in the page content
    • The text between
    • Text between <p> and </p> is displayed as a paragraph

--------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------

HTML element syntax
    • HTML element to start tag starting
    • HTML element terminated with end tag
    • The content of an element is the content between the start tag and the end tag
    • Some HTML elements have blank content (empty contents)
    • Empty elements are closed in the start tag (ending with the end of the start tag)
    • Most HTML elements can have properties

HTML elements that have no content are called empty elements. The empty element is closed in the Start tab.

<br> is the empty element without closing the label (<br/> Tag defines line wrapping).

In XHTML, XML, and future versions of HTML, all elements must be closed.

Adding slashes to the start tag, such as <br/>, is the correct way to close an empty element, which is accepted by HTML, XHTML, and XML.

A property is always in the form of a name/value pair, such as: Name= "value".

Attributes are always specified in the start tag of an HTML element.

Always quote attribute values

In some cases, such as the property value itself contains double quotation marks, you must use single quotation marks.

--------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------

HTML Horizontal Line

<HR/> Tags Create horizontal lines in the HTML page.

The HR element can be used to delimit content.

HTML annotations

You can insert comments into HTML code, which improves readability and makes your code easier to understand.

<!--This is a comment-

HTML Wrapping

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 style

The Style property is used to change the styles of HTML elements.

<!--<body bgcolor= "White" > in HTML 4, the bgcolor property is deprecated (Deprecated)--

<!--

The Style property of HTML

The role of the style property:

Provides a common way to change the style of all HTML elements.

The style is introduced in HTML 4, which is a new preferred way to change the style of HTML elements. HTML styles enable you to add styles directly to HTML elements by using the Style property, or indirectly in a separate style sheet (CSS file). CSS Tutorials

The Background-color property defines the background color for the element

The font-family, color, and Font-size properties define the font families, colors, and font sizes of the text in the element, respectively

The Text-align property specifies the horizontal alignment of the text in the element

Text formatting tags

"Computer Output" tab

References, references, and term definitions

A complete HTML reference manual

HTML Standard Properties Reference manual

Extended reading:

Change the appearance and meaning of text

--------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------

Reference (quotation) HTML <q> for short references

Browsers typically surround quotes for <q> elements.

HTML referenced with raised here <blockquote>

The HTML <blockquote> element defines the referenced section.

The browser typically indents the <blockquote> elements.

HTML <abbr> for Acronyms

HTML <abbr> elements define abbreviations or acronyms.

HTML Learning Note One

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.