HTML knowledge questions

1. WEB talk about the understanding of the standards and the W3C? What are the advantages of web standards?

WEB standard is not a standard, but a collection of standards. The main page consists of three parts: structure (Structure), performance (Presentation) and behavior (Behavior). Corresponding standard can be divided into three areas: the structure of the standard languages ​​including XHTML and XML, the performance standard languages ​​including CSS, standards of conduct including object models (such as the W3C DOM), ECMAScript and so on. Most of these standards (drafted and published by the World Wide Web Consortium, there are some other standards organizations to develop standards, such as ECMA (European Computer Manufacturers Association) of the ECMAScript standard.

W3C standard for a web made of standardized requirements, i.e. some of the actual programming code specification, comprising the following:

:( label specifications for structural requirements can improve the efficiency of the search engines to crawl the page, useful for SEO)

           Lowercase letters tag, label tag to be closed, do not allow arbitrary nesting

For css and js for: to make use of the chain css stylesheets and js script. Structure, performance and behavior is divided into three, compliant. At the same time improve page rendering speed, improve the user experience.

              Style minimize the use of style sheets between the lines, the structure and performance of separation, id tags and class attributes such as name known to do see text meaning, the less the label, load faster user experience improve, code maintenance is simple, easy to revision

              Do not change the page content, can be provided without the need to copy the contents of the print version, to improve the usability of your site.

WEB standard (structure, performance, behavior separation) What are the advantages of it?

Easy to maintain: just change the CSS file, you can change the style of the whole station

Fast response page: HTML file size smaller, short response time

Accessibility: Semantic HTML (phase separation structure and performance HTML) page document prepared more easily recognized screen reader

Device compatibility: different stylesheet can make page rendering different styles on different devices

Search Engine: Semantic HTML can be resolved more easily search engines, improve rankings

 

2. What is the difference between the standard mode and browser mode weird?

Different box model rendering modes. In a page rendering mode Standard mode page rendering in accordance with the definition of HTML, CSS, and in quirks mode is the browser for compatibility with a long time ago for older browsers designed, does not strictly follow the W3C standards produced. There is a browser-based page description file types to determine which rendering mode adopted, if there is a complete DOCTYPE then the browser will use the standard mode, if the missing will use quirks mode

① different interpretations box model in quirks mode, the cartridge model IE box model (W3C standard box model except that:. Content portion contains IE box model pading border and within margins, width and height composition.)

② overflow of processing elements, standard mode, overflow default value is visible; in quirks mode to deal in, the overflow will be extended as a box, that is determined by the size of the element content, overflow does not cut, automatically adjust the frame element, It contains the overflow content.

③table elements fonts, CSS, for the font attributes can all be inherited. Quirks mode for the table elements, some elements of the font will not be packaged and other elements from the body to the succession of particular font-size property.

④ In standard mode: the inline element can not customize the size, quirks mode: width height may affect the size of the defined elements.

 

3. <img> alt attribute the difference to the title tag?

alt its value is only displayed when pictures can not be loaded, and the title is in the picture normal load the mouse draw up the displayed values, although there are alt latter function, but just only support low version of the browser, ie, high version and standard browsers do not support this function.

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/goforxiaobo/p/12543699.html