HTML-related Knowledge point collation

Source: Internet
Author: User

Some of the problems found when combing HTML. To summarize, the answers are mostly from the Internet.

I. The difference between HTML and HTM

There is no essential difference : The HTM is used in the Win32 era when the system recognizes only 3-bit extensions. It is now generally used. html.

Two. The difference between href and src

SRC is the abbreviation for source, which points to the location of the external resource, which is embedded in the document where the current label is located, and the resources it points to are downloaded and applied to the document when the SRC resource is requested, such as JS scripts, IMG images, and frame elements.

< = "js.js" ></script >

When the browser resolves to the element, it pauses the download and processing of other resources until the resource is loaded, compiled, executed, and so on, like pictures and frames, similar to embedding the resource in the current tag. This is why the JS script is placed at the bottom instead of the head .

The HREF is the abbreviation for the hypertext reference, which points to the location of the network resource , establishes the link between the current element (anchor point) or the current document (link), and if we add in the document

<href= "Common.css"  rel= "stylesheet"/>

The browser will then recognize the document as a CSS file, and it will download the resources in parallel and will not stop processing the current document.

Three. The difference between using link and using @import when introducing cascading style sheets

1. The differences between ancestors. Link is an xhtml tag , and @import is completely a way to provide CSS .

In addition to the link tag can be loaded CSS, but also can do a lot of other things, such as the definition of RSS, the definition of REL connection properties, @import can only load CSS.

2. Differences in loading order. When a page is loaded (when viewed by the browser), theCSS referenced by the link is loaded at the same time, and @import referenced CSS waits until the page has been downloaded and loaded . So sometimes browsing @import loading CSS page when there is no style (that is flashing), the speed of the slow time is quite obvious (dream of the way to load CSS is to use the @import, I download while browsing the dream of the Web page, the above problems will occur).

3. Differences in compatibility. Because the @import is CSS2.1 proposed by the old browser is not supported, @import only in IE5 above the ability to identify, and link tag does not have this problem.

4. Use the DOM to control the differences in style. When using JavaScript to control the DOM to change styles, you can only use the link tag, because @import is not controlled by the DOM.

Four. The difference between I/em and B/strong

In HTML4.01:< B > < i > Yesvisual Elements(presentationl elements), representing meaningless bold, meaningless italic, the expression style is {Font-weight:bolder}, only means "here should be bold" or "Here should be italicized", the two labels in the HTML4. 01 is not recommended for use;
< em > and < strong > YesExpressing features(phrase elements). < em > (emphasized text) represents the general emphasis text, while < strong > (strong emphasized text) represents a stronger accent than < em > semantics.

In the new HTML5 work draft:< EM > < strong > is still the expression element (phrase elements). But then the < strong > represents the emphasis on the HTML page (emphasized text), < em > denotes the emphasis in the sentence (i.e. emphasis on semantics) five. The difference between a domain name and a website name

The name of the site is equivalent to the land and land of the building, on this land you can build any number of buildings.

baidu.com//Domain name

http://news.baidu.com///Website name consists of server name + domain name; HTTP is the transport protocol

http://map.baidu.com/Baidu Map

Six. The role of META tags

The <meta> element provides meta-information about the page (meta-information), such as descriptions and keywords for search engines and update frequency.

The <meta> tag is located in the header of the document and does not contain any content. The properties of the <meta> tag define the name/value pairs associated with the document.

Details: http://www.w3school.com.cn/tags/tag_meta.asp

HTML-related Knowledge point collation

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.