HTML Skeleton Structure

Source: Internet
Author: User
Tags sublime editor

Previous words

?? A complete HTML document must contain 3 parts: Document declaration, document header, and document body. They form the skeleton structure of the HTML. The document declaration and the document header are described separately, and this article details the underlying elements that make up the HTML skeleton structure

Html

?? The element represents the root (root) of the HTML document, and all other elements are descendants of that element. with tags, the start and end points of the document are qualified, and between them is the head and body of the document. The header of the document is defined by the label, and the body is defined by the <body> label

"xmlns"

?? The xmlns attribute is used to assign the document's XML namespace. The default value is "http://www.w3.org/1999/xhtml", which is necessary in XHTML and optional in HTML

<html xmlns="http://www.w3.org/1999/xhtml">

HEAD

?? The label is used to define the head of the document, which is the container for all head elements.; Most are not visible, describing some of the basic properties and information of the document (which can be rendered as title and icon). The child elements under the element mainly include,,,, <meta> <title> <base> <link> <style> and <script> these six elements

??<title> Defines the title of the document, which is the only required element in the head section

?? If a label is omitted from the document , most browsers automatically create an element

?? More information about the header of a document

BODY

??<body> Represents the main content of an HTML document, any HTML document, allowing only one element to exist <body>

"Default Style"

chrome/firefox/safari/IE8+    margin:8px;IE7-    margin:15px 10px;

Structure

?? In the sublime editor, enter!, and then hold the TAB key, you can generate a basic HTML structure, as follows

<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Document</title></head><body></body></html> 

?? In practice, the head structure of the document often needs to carry some common functions, so the HTML structure is more complex, the structure is as follows

<! DOCTYPE html><Html><Head><Metacharset="Utf-8"/><Title>document</Title><MetaName="keywords"Content=""/><MetaName="description"Content=""/><meta name= "viewport" content= "width=device-width"/> < link rel= "stylesheet" href= "5/style.css"/> <link rel= "shortcut icon"  Href= "Ico.ico"/></head><body></body ></HTML>        

HTML skeleton Structure

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.