Organize HTML basics and HTML Basics

Source: Internet
Author: User

Organize HTML basics and HTML Basics

HyperText Markup Language (HTML)

Hypertext: indicates that a page can contain images, links, music, programs, and other non-text elements.

Tag: a page consists of various tags. The text contains hidden text tags.

HTML uses tag tags to describe webpages, starting with

Sublime uses the shortcut to generate a template:

<! DOCTYPE html> <! -- Document type declaration --> 

 
<Title> Title
<Base> Default link address of the page link tag
<Link> Relationship between a document and external resources
<Meta> Metadata in HTML documents
<Script> Client script file
<Style> HTML Document Style File

The base tag and meta tag are usually copied from other places. The following shows the usage of these two tags.

 
  
  • Content attribute: defines metadata related to the http-equiv or name attribute.
  • Name attribute: Describes some information about the document, which is friendly to search engines and mobile device-based descriptions.
    <Meta name = "viewport" content = "initial-scale = 1, maximum-scale = 1, user-scalable = no"> <! -- Define the ratio displayed in the window, whether to scale, and the maximum zoom value --> <meta name = "apple-mobile-web-app-capable" content = "yes"> <! -- Ios2.0 + full screen? --> <meta name = "apple-mobile-web-app-status-bar-style" content = "black"> <! -- Set the style of the Web App Status Bar (the top bar of the screen) -->
  • Http-equiv: the attribute provides a name for the name/value pair. AndInstructionsBefore the server sends the actual document, it must first include the name/value pair in the header of the MIME document to be sent to the browser.
    <Meta http-equiv = "content-Type" content = "text/html; charset = gb2312"> <! -- Set the text type, the character set used by the page. --> <Meta http-equiv = "expires" content = "Wed, 20 Jun 2007 22:33:00 GMT"> <! -- You can set the expiration time of a webpage. Once the webpage expires, it must be re-transmitted to the server. The GMT format must be used. --> <Meta http-equiv = "Pragma" content = "no-cache"> <! -- Used to disable the browser from accessing the page content from the Cache on the local machine. Once the browser leaves the page, it cannot be called out from the Cache. Usage: --> <meta http-equiv = "cache-control" content = "no-cache"> <! -- Clear the cache (access this website again and download it again !) --> <Meta http-equiv = "Set-Cookie" content = "cookievalue = xxx; expires = Wednesday, 20-Jun-2007 22:33:00 GMT; path =/"> <! -- The GMT time format must be used. If the webpage expires, the cookie on the disk will be deleted. --> <Meta http-equiv = "Refresh" content = "2; URL = http://www.net.cn/"> <! -- Automatically refresh and direct to the new page --> <meta http-equiv = "Window-target" content = "_ top"> <! -- Force the page to be displayed on an independent page in the current window to prevent others from calling their own pages in the framework. --> <Meta http-equiv = "Pics-label" content = ""> <! -- Webpage rating --> <meta http-equiv = "Page_Enter" content = "revealTrans (duration = 1.0, transtion = 12)"> <! -- Set the special effect on the page --> <meta http-equiv = "Page_Exit" content = "revealTrans (duration = 1.0, transtion = 12)"> <! -- Set the special effect when leaving the page -->

I searched from the Internet and did not test which ones are really useful. I will try again later when I really need them.

<Body> the tag is placed in the document content, which does not seem to need to be mentioned too much. html5 mainly adds a lot of semantic tags, so that we can better structure the page.

Related Article

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.