html- basis

Hypertext Markup Language

   Text Markup Language: only express the text.

   HTML: There are more rich display capabilities, you can express text, pictures, screen, audio, and so on.

version

  HTML 2.0-- 1995 on 11 Yue published as RFC 1866, RFC 2854 in the release was announced in June 2000 after outdated

  HTML 3.2-- 1997 January 14, W3C Recommendation

  HTML 4.0-- 1997 December 18, W3C Recommendation

  HTML 4.01 (slight improvement) - 1999 December 24, W3C Recommendation

  HTML 5-- 2014 Nian 10 Yue 28 Ri, W3C Recommendation

Document declaration

  The first line of html files are usually HTML version of the statement, the purpose of doing so is to tell the browser with the appropriate model to resolve our HTML.

1  <-! Now these are basically doctype declaration recorded portion h4, to avoid seeing his face when forced to rip off -> 
2  <-! Transition board -> 
3  <! DOCTYPE HTML the PUBLIC "- // DTD HTML 4.01 Transitional // the W3C // EN " 
 4  " http://www.w3.org/TR/html4/loose.dtd " > ,
 5  <-! strict -> 
6  ! < DOCTYPE HTML the PUBLIC" - the W3C // // 4.01 // EN the HTML the DTD " 
 . 7  " http://www.w3.org/TR/html4/strict.dtd " > 
. 8  <-! frameset -> 
. 9  ! < DOCTYPE the HTML the PUBLIC "- // the W3C // DTD HTML 4.01 Frameset // EN" 
 10  "HTTP: //www.w3.org/TR/html4/frameset.dtd">
11 <!-- h5 赛高 -->
12 <!DOCTYPE html>

label

  Browsing make different rendering by different labels. Tag is the page structure, a good definition of the appropriate structure can do more with less.

Property of the label

  Each tab has its own attributes and attribute values. Role attribute can be divided into several categories: element tag, using the default action provided by the browser, custom attributes

. 1  <! - class / ID attribute is selected for convenience or css js element, the operating element -> 
2  <-! Custom property data is the nearest post-operation data conveniently defined on the element -> 
3  <! - title: after adding all the labels will be able to see the title hover tips, this is the default style provided by the browser -> 
4  < div class = "people" the above mentioned id = "Hero" the Data = "001" title = "this is a hero" > </ div >

Garbage problem

  Code: According to the rules of the characters turn into binary code.

  Decoding: The rules converted into the binary coded characters.

  Garbled reasons: different character set encoding and decoding use.

  Common character set: ASCII, GBK, GB2312 (Chinese system default encoding), UTF-8 (Unicode), ANSI

  Solution: Use meta tag we need to declare the character set used in the head will be able to use Chinese in html as utf-8.

1 <meta charset="UTF-8">

Entity character
  when we need to use html in greater or less than symbol (> <), the editor may prompt you can not do that. htm reserved some escape characters to solve the angle brackets, spaces, this problem can not be used directly from your code.
Portal: http: //www.w3school.com.cn/html/html_entities.asp

 

Guess you like

Origin www.cnblogs.com/keliguicang/p/10950566.html