This is a HTML5 series, mainly 0 basic babies who are quick to understand and learn HTML5.
Understanding HTML
1. What is HTML
- HTML is a language used to describe a Web page.
- HTML refers to Hypertext Markup Language (Hyper Text Markup Language)
- HTML is not a programming language, but a markup language (markup language)
Note: Markup language is a set of tag tags (markup tag), HTML uses tag tags to describe web pages
2. HTML version
version |
year |
Html |
1991 |
HTML + |
1993 |
HTML 2.0 |
1995 |
HTML 3.2 |
1997 |
HTML 4.01 |
1999 |
XHTML 1.0 |
2000 |
HTML 5 |
2012 |
XHTML 5 |
2013 |
HTML5 Related Knowledge
1. Learn HTML5 to learn the knowledge (road map)
- Html
- Xhtml
- Css
- CSS3
- Javascript
- Jquery
- HTML5
new features of HTML5
1.HTML5 new Features
- Canvas labels for painting
- Video and audio elements for media playback
- Better support for local off-line storage
- New special content elements (e.g. article, footer, header, nav, section)
- New form controls (e.g. calendar, date, time, email, url, search)
- Browser support (for example: Chrome, Firefox, Safari, Opera, IE9)
Basic HTML Tutorial
1. Disclaimer:
Because there are several different versions of HTML, the browser will display the HTML page only if it is completely explicit about which version to use. That's the use.
- DOCTYPE declares the document type
- Claims help to display Web pages correctly in the browser
//HTML5:不基于 SGML,所以不需要引用 DTD。<!DOCTYPE html>//HTML4.01:<!DOCTYPE> 声明引用 DTD,因为 HTML 4.01 基于 SGML。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">//XHTML1.0:<!DOCTYPE> 声明引用 DTD<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2.HTML Base Label
Head, body, title
<!DOCTYPE html><html><head><title>这里是文档标题</title></head><body>这里是文档内容......</body></html>
3.HTML Title
and other labels are defined
Defines the maximum caption. defines the smallest caption.
<! DOCTYPE html><html><head><title>Here is the document title</title></head><body><H1>Title H1</H1><h2>Title H2</H2><h3>Title H3</h3><h4>Title H4</h4><h5>Title H5</h5><h6>Title H6</h6></body></html>
Effect:
4.HTML Paragraph
<p>
Label definition Paragraph
<!DOCTYPE html><html><head><title>这里是文档标题</title></head><body><p>这是一个段落。</p></body></html>
Effect:
5.HTML Links
<a>
Label definition Links
<! DOCTYPE html><html><head><meta charset="UTF-8"><title>Here is the document title</title></head><body><a href="">I am a link. Oh!</a></body></html>
Effect:
6.HTML Images
Label definition image
<! DOCTYPE html><html><head><meta charset="UTF-8"><title>Here is the document title</title></head><body><h3 href="">I've got a random one. Oh! (You can leave a message to guess what the occupation is.) )</h3><img src="1.jpg"/></body></html>
Effect:
elements, attributes, and formatting of HTML5Elements of the 1.HTML5
The HTML element refers to all the code from the start tag (start tag) to the end tag (end tag).
start Tag |
element Content |
end Tag |
<p> |
This is a Web page |
</p> |
<a href="#" > |
This is a link |
</a> |
<br /> |
|
|
HTML element syntax
- HTML element to start tag starting
- HTML element terminated with end tag
- The content of an element is the content between the start tag and the end tag
- Some HTML elements have blank content (empty contents)
- Empty elements are closed in the start tag (ending with the end of the start tag)
- Most HTML elements can have properties
Nested HTML elements
Most HTML elements can be nested (other HTML elements can be included).
HTML documents are composed of nested HTML elements.
Properties of the 1.HTML5
HTML tags can have properties.
- A property is always in the form of a name/value pair, such as: Name= "value".
- Attributes are always specified in the start tag of an HTML element.
Common Properties:
: Align Alignment
<body>
: BgColor background color <a>
: target specifies where to open the link
Common Properties:
Property Value Description
Class: The name of the specified element
ID: The unique ID of the specified element
Style: The inline style of the specified element
Title: Additional information for the specified element
<! DOCTYPE html><html><head><meta charset="UTF-8"><title>Example 5</title></head><body bgcolor="#CCCC99"><a href="Http://blog.csdn.net/wenteryan">My blog</a><H1 align="center">Those who have something to do, to burn their bridges, Hyakuji Qin Guan after all, painstaking people, the days are not negative, hardships, 3,000 more can swallow Wu.</H1></body></html>
Formatting of the 1.HTML5
HTML can define a number of elements for formatting output, such as bold and italic characters.
label |
Description |
<b> |
|
<big> |
|
<em> |
|
<i> |
|
<small> |
|
<strong> |
|
<sub> |
|
<sup> |
|
<ins> |
|
<del> |
|
<! DOCTYPE html><html><head><meta charset="UTF-8"><title>Example 5</title></head><body bgcolor="#CCCC99"><H1>Text formatting tags</H1><b>Defines bold text.</b><big>Defines a large word.</Big><em>Defines the emphasis on text.</em><i>defines italic words.</i><small>Define small words.</Small><strong>Define the aggravating tone.</Strong><sub>Defines the subscript word.</Sub><sup>Defines the superscript word.</sup><ins>Defines the insertion word.</ins><del>Defines the deletion word.</del></body></html>
Effect:
One, to elaborate on the HTML5 of the HTML5 basic explanation