HTML Introduction and Tagging

Source: Internet
Author: User
Tags color representation

First, web standards

Web Preparation Introduction:

    • World Wide Web Consortium, the organization used to develop Web standards (organization)
    • Web standards: Guidelines for making Web pages to follow
    • The classification of Web Preparation specification: Structure standard, performance standard, behavior standard.
    • Structure: HTML. Presentation: CSS. Behavior: Javascript.

Web Preparation Summary:

    • Structural standard: equivalent to human body. HTML is used to make a Web page.
    • Performance Standard: the equivalent of a person's clothes. CSS is to beautify the Web page.
    • Standard of conduct: equivalent to a person's action. JS is to let the Web page move, with vitality of

Second, the browser

Browser is the platform to run the Web page, commonly used browsers are IE, Firefox, Google (Chrome), Cheetah Browser, Safari and opera, etc.

The ps:"browser kernel" is the rendering engine used by the browser, and the rendering engine determines how the browser displays the contents of the page and the formatting information of the page. "

The rendering engine is the root cause of compatibility issues.

Three, the introduction of HTML

1. Overview of HTML

HTML Full name Hypertext Mackeup Language, translated into Hypertext Markup Language, which is not a programming language, is a descriptive markup language that describes how hypertext content is displayed. such as font, color, size and so on.

    • Hypertext: Audio, video, picture is called hypertext.
    • Tags:< english words or letters > called tags, an HTML page is made up of various tags.

role : HTML is the language that is responsible for describing the semantics of the document.

Note : The HTML language is not a programming language (there is a compilation process), but rather a markup language ( no compilation process ), and the HTML page is parsed directly by the browser.

In HTML, there is nothing else but semantics .

HTML is a pure text file (is renamed with TXT file), with some tags to describe the semantics of the text, these tags are not visible in the browser, so called "hypertext", so it is "Hypertext Markup Language."
So, next, we're definitely going to learn a bunch of tags in HTML that can give different semantics to text.

For example, when asked about the interview, what does the H1 tag do?

      • Correct answer: Add the semantics of the main title to the text.
      • Wrong answer: Bold text, add black, grow larger.

2. Web terminology for HTML

      • Web page: A page made up of various tags is called a Web page.
      • Home page: A homepage or navigation page of a website.
      • Tags: <p> called the start tag, </p> called the end tag, also called the tag. Each label has a special meaning.
      • element: <p>内容</p> called element.
      • Properties: The auxiliary information that is given to each label.

3. HTML Color Introduction

Color representation:

    • Pure words: red, green, blue, orange, gray, etc.
    • 10 binary representation: RGB (255,0,0)
    • 16 binary representation: #FF0000, #0000FF, #00FF00等

We will first remember the color of a few pure words, CSS lessons are detailed in 10 and 16 binary.

RGB Color Mode:

    • In nature, all colors can be used in red, green, Blue (RGB) The three color wavelength of different intensity combinations, which is often said the principle of three primary colors.
    • RGB tricolor is also called additive color mode, this is because when we add different wavelengths of light together, we can get a different blend color. Example: Red + green = yellow, red + blue = purple, green + blue = Cyan
    • In digital video, 8-bit encoding of the RGB tri-color is about 16.78 million colors, which is what we often call true color. The RGB color mode is used for all display devices.
    • RGB each has 256 level (0-255) brightness, 256 levels of RGB color can be combined out about 16.78 million colors, namely 256x256x256=16777216.

4. HTML specification

    • HTML is a weak language
    • HTML is case insensitive
    • HTML page suffix name is HTML or HTM (some systems do not support suffix names longer than 3 characters, such as DOS system)
    • Structure of HTML:
      • Declaration part: The main function is to tell the browser which standard is used by this page. is the HTML5 standard.
      • Head part: Tell the server some extra information about the page. Does not appear on the page.
      • Body part: The code we write must be placed inside this tag.

4.1 Specifications for writing HTML

1) All markup elements must be properly nested, not cross-nested. Examples of correct wording:

(2) All tokens must be lowercase.

(3) All marks must be closed.

    • Bilateral markings:<span></span>
    • One-sided marking: <br> turn into <br /> turn , and

(4) All attribute values must be quoted.


(5) All attributes must have a value.<input type="radio" checked="checked" />

Basic grammatical features of 4.2 html

HTML swap-insensitive, tab insensitive

HTML only cares about the nested structure of tags, nested relationships. Who nested who, who was nested, and line-wrapping, tab-Independent. No line break, tab not tab, does not affect the structure of the page.

In other words, HTML does not rely on indentation to represent nesting, that is, to look at the label's parcel relationship. However, we find that there is good indentation and the code is easier to read. Ask everyone to indent the label correctly.

Blank folding Phenomenon

All the text in the HTML, if there are spaces, line breaks, tab will be collapsed to a space display.

HTML Introduction and Tagging

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.