--html Day1 for getting started with the front end

Source: Internet
Author: User

A project with three elements is a Web project

1. Browser

---Request to the server Archie, download the Web page (HTML) from the server, and then execute the contents of the HTML display.

2. Server

--Receives the browser request, sends the corresponding page to the browser.

3. HTTP protocol

--The communication protocol between the browser and the server

XML and HTML

Extensible Tag Language

tags, attributes, and tag nesting relationships can all be extended

Extensions, customizing

Hypertext Tag Language

The grammar is fixed.

Used to display data

There are specific versions that adhere strictly to the XML specification

HTML can be understood as tag-invariant XML

Hypertext Markup Language (English: Hypertext Markup Language, abbreviation: HTML) is a standard markup language for creating Web pages.

First page:

1 <!DOCTYPE HTML>2 <HTML>3     <!--4 make some basic configuration of the Web page in the head tag5      -6     <Head>7         <!--8 Description: CharSet set decoding utf-8 in Meta9          -Ten         <MetaCharSet= "Utf-8" /> One         <title></title> A     </Head> -     <!-- - Description: Write the content of the page in the body the      - -     <Body> - Hello, world!  -     </Body> + </HTML>
Instance parsing
    • <! DOCTYPE html> declared as HTML5 document
    • element is the root element of an HTML page
    • The element contains meta data for the document
    • The <title> element describes the title of the document
    • The <body> element contains the visible page content
    • < tags > content </ tags >
HTML page Structure

HTML version

Since the inception of the network, there have been many HTML versions:

version Release Time
Html 1991
html+ 1993
HTML 2.0 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 1.0 2000
HTML5 2012
XHTML5 2013

The version beginning with x is strictly in accordance with the language. It is not recommended.

<! Doctype> statement

<! The doctype> declaration helps the web page display correctly in the browser.

There are many different files on the network, and if you can correctly declare the HTML version, the browser will display the content of the Web page correctly.

The DOCTYPE declaration is case-insensitive, and can be used in the following ways:

<! DOCTYPE HTML > <! DOCTYPE HTML > <! DOCTYPE HTML > <! Doctype Html >
General Declaration HTML5
<! DOCTYPE HTML >

HTML 4.01

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd " >

XHTML 1.0

<! DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">
Chinese Code

Currently in most browsers, the direct output of Chinese will be garbled in the case, at this time we need to declare the character in the head as UTF-8.

< Head >        <!--             Description: In Meta charset set decoding utf-8  page encoding        -         <   CharSet= "Utf-8"/>        <title></  Title></head>

Example

1 <!DOCTYPE HTML>2 <!--3 the HTML version used by the Declaration4 HTML is the only root element5  -6 <HTML>7     <!--8 make some basic configuration of the Web page in the head tag9      -Ten     <Head> One         <!-- A Description: CharSet set decoding utf-8 in Meta -          - -         <MetaCharSet= "Utf-8" /> the         <!-- - declare the title of the page in title -          - -         <title>First page</title> +     </Head> -     <!-- + Description: Write the content of the page in the body A      - at     <Body> - Hello, world!  - Good HTML -     </Body> - </HTML>

HTML Title

The HTML title (Heading) is defined by the

HTML Paragraph

The HTML paragraph is defined by the label <p>.

HTML Links

HTML links are defined by tags <a>.

<href= "http://www.runoob.com"> This is a link </A  >

HTML Images

HTML images are defined by tags .

Example:

1 <!DOCTYPE HTML>2 <HTML>3     <Head>4         <MetaCharSet= "UTF-8">5         <title></title>6     </Head>7     <Body>8         <!--title -9         <H1>Daojun</H1>Ten         <H2>The sword moves Mountains and rivers</H2> One         <H3>Magic Day Mind</H3> A         <h4>Chen Nan</h4> -         <h5>Reckless</h5> -         <h6>Dream</h6> the          -         <!--paragraph - -          -         <P>At this time the Qing-SLA body in Swallow Yun Ling, surrounded by folk songs</P> +         <P>At this time the Qing-SLA body in the Swallow Cloud Ridge,</P><P>Surrounded by folk songs</P> -          +         <ahref= "Http://www.runoob.com">This is a link</a> A         <imgsrc= "Http://p0.so.qhimgs1.com/t016997d986a16ebe7a.jpg"width= "258"Height= "The " /> at      -     </Body> - </HTML>

--html Day1 for getting started with the front end

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.