HTML notes, html learning notes
Focus on the separation of structure and style:
1. Write code by structure and semantics first
2. Set the CSS style.
3. Reduced HTML and CSS fit
Precautions for using javascript:
1. Stable degradation
2. Learning from CSS: separating javascript
3. Backward compatibility
4. Performance Considerations: minimize access to DOM and tags, merge and place scripts, compress and optimize scripts
HTML page loading and parsing process:
Http://www.w3cfuns.com/blog-5459951-5404057.html
HTML code specification: http://www.html5cn.org/article-7537-1.html
HTML head label: http://fex.baidu.com/blog/2014/10/html-head-tags? Qq-pf-to = pcqq. group
Meta tag common attributes: http://bbs.html5cn.org/thread-85334-1-1.html1. <input type = "radio" name = ""> the values of multiple single queue names must be the same to achieve linkage switching. 2.html prohibits the clearing of input text input cache. By default, most browsers cache the input value. cache records can be cleared only when ctl + F5 is forcibly refreshed.
If you do not want the browser to cache the input value, there are two methods:
Method 1:
Add autocomplet e = "off" in the input that does not want to use the cache ";
Method 2:
Add autocomplet e = "off" to the form label of the input ";
3. <a href = "#"> after you click the link, the page will be rolled up to the TOP, # The default anchor is # TOP, <a href = "javascript:;> after you click the link, the page does not move. Only the link is opened. After clicking the link, you can use href = "javascript:;" instead of href = "#" And return false to avoid rolling the page to the top. 4. the difference between the input button and the button: the input tag with the attribute "type =" submit "either looks ugly in different browsers (in Firefox ), either there is such a defect (in Internet Explorer), or even very rigid (in Safari ). The solution to this problem is usually to set the attribute of input to image and design a button image by yourself. In fact, according to W3C definition, <button> elements come into being to solve these differences. All mainstream browsers support <button> labels. Inside the button element, you can place content, such as text or images. This is the difference between this element and the button created using the input element. Compared with <input type = "button">, the <button> Control provides more powerful functions and richer content. All content between the <button> and </button> labels is the content of the button, including any acceptable body content, such as text or multimedia content. For example, you can include an image and related text in a button and use them to create an attractive labeled image in the button. The only prohibited element is image ing because its mouse-and keyboard-sensitive actions interfere with form buttons. Always define the type attribute for the button. The default InternetExplorer type is "button", while the default value in other browsers (including W3C specifications) is "submit". Therefore, do not treat the <button> label as the input element in <form>. If the button element is used in an HTML form, different browsers submit different values. InternetExplorer submits the text between <button> and <button/>, while other browsers submit the content of the value attribute. Use the input element in the HTML form to create a button. 5. html text is optional: http://bbs.html5cn.org/thread-84022-1-1.html6 . The website logo should use the img label, because in addition to setting alt and being captured by the engine, it can also be displayed when CSS is streaking. 7. (1) block-level elements cannot be placed
Inside:
<P> <ol> <li> </ol> </p> -- Error
<P> <div> </p> -- error (2) There are several special block-level elements that can only contain embedded elements, but cannot contain block-level elements, these special labels are: h1, h2, h3, h4, h5, h6, p, dt