HTML basic structure, headers, annotations

Source: Internet
Author: User

Basic structure

1.HTML Basic Structure

<meta charset= "Utf-8" >

<title> This is my first page of my </title>

<body>

This is my first page.

</body>

we copied the code into the TXT, if there is garbled phenomenon  

Then we save the file as a file in utf-8 format, and there's no problem opening it.

Head: This is a pair of header information, mainly displaying descriptive information, but not displayed in the Web page

Body: The body part, the content that is actually displayed in the Web page

The

In the

Script (Scripts)

Style files (CSS)

and various meta-information.

The element labels that can be added to the head area are:

<title>,<style>, <meta>, <link>, <script>, <noscript>, and <base>.

2 , HTML <title> Elements

<title> tags define the titles of different documents.

<title> is required in the html/xhtml documentation.

<title> elements:

Defines the title of the browser toolbar

Titles that appear in favorites when a page is added to a favorite folder

Title displayed on the Search engine results page

3 , HTML <link> Elements

The <link> tag defines the relationship between the document and the external resources.

<link> tags are typically used to link to style sheets:

Example:

<link rel= "stylesheet" type= "Text/css" href= "Mystyle.css" >

4.HTML <style> Elements

The <style> tag defines the style file reference address for the HTML document.

In the <style> element you need to specify a style file to render the HTML document:

Example:

<style type= "Text/css" >

body {background:white; Mso-pagination:widow-orphan "Align=left> p {color:blue}

</style>

5.<meta> Label Usage examples

The META tag describes some basic meta-data.

The <meta> tag provides metadata. The metadata is also not displayed on the page, but is parsed by the browser.

Meta elements are typically used to specify the description of a Web page, keywords, last modified time of the file, author, and other meta-data.

Meta data can be used for browsers (how to display content or reload pages), search engines (keywords), or other Web services.

<meta> generally placed in

Example:

Set character sets

<meta charset= "Utf-8" >

Define keywords for search engines:

<meta name= "keywords" content= "HTML, CSS, XML, XHTML, JavaScript" >

Define the description for the page:

<meta name= "description" content= "Free Web tutorials on HTML and CSS" >

Define page Authors:

<meta name= "Author" content= "Hege refsnes" >

Refreshes the current page every 30 seconds:

<meta http-equiv= "Refresh" content= ">"

6. Notes

Note:<!--comments--

! : Express Statement, note

HTML basic structure, headers, annotations

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.