In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "HTML example code analysis", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "HTML example code analysis"!
CodePage: readable / writable. Plastic surgery. Defines the code page used to display the contents of the page in the browser. Code pages are the numeric values of a character set, and different languages use different code pages. For example, the ANSI code page is 1252, the Japanese code page is 932, and the simplified Chinese code page is 936. In general, when you upload to foreign web space, or extract database records and other garbled code, use this method to solve.
Open some sites that meet the standards, such as Macromedia, a famous web design software developer, and the personal website of designer Zeldman, and you will find the same code. The code for other compliant sites, such as k10k.net, is as follows:
So what does this code mean? Does it have to be placed?
What is DOCTYPE?
The above code is called the DOCTYPE declaration. DOCTYPE is an abbreviation for document type (document type) to indicate what version of XHTML or HTML you are using.
The DTD (such as xhtml1-transitional.dtd in the example above) is called the document type definition, which contains the rules of the document, and the browser interprets the identity of your page according to the DTD you define and displays it.
The DOCTYPE declaration is an essential and critical part of building a standards-compliant web page; your logo and CSS will not take effect unless your XHTML determines the correct DOCTYPE.
XHTML 1.0 provides three DTD declarations to choose from:
? Transitional: a very lenient DTD that allows you to continue to use the HTML4.01 logo (but in accordance with xhtml). The complete code is as follows:
? Strict: with strict DTD, you cannot use any presentation layer logos and attributes, such as
. The complete code is as follows:
? Framed (Frameset): a DTD designed specifically for framed pages. If your page contains frames, you need to use this DTD. The complete code is as follows:
What kind of DOCTYPE do we choose
The ideal is, of course, strict DTD, but for most of us designers who are new to the web standard, transitional DTD (XHTML 1.0 Transitional) is the ideal choice for now (including this site, which also uses transitional DTD). Because this DTD also allows us to use presentation layer identities, elements, and attributes, it is also easier to pass W3C code verification.
Note: the above-mentioned "presentation layer logo, attributes" refers to those tag that are purely used to control the performance, such as tables for typesetting, background color identification, etc. In XHTML, identification is used to represent the structure, not to implement the form of expression, and the purpose of our transition is to eventually achieve the separation of data and presentation.
For example: mannequins change clothes. Models are like data, clothes are the form of expression, models and clothes are separate, so you can change clothes at will. In the original HTML4, data and performance are mixed together, so it is very difficult to change the form of expression at one time. Ha ha, a little abstract, this concept needs us to gradually understand in the process of application.
Supplement
The DOCTYPE declaration must be placed at the top of each XHTML document, above all code and logos.
Represents a namespace
The xml document conforms to the W3C standard.
It means to force the browser code to be set to simplified Chinese (GB2312). The role of this sentence is very critical, in the process of making a web page must not be omitted. It can be added to any part of a web page, preferably between and. (FrontPage and Dreamweaver have included this sentence in their new web pages.)
In the past, the omission of this web page used to display normally. But now WindowsXP's IE6.0 also supports simplified Chinese (GB18030), which is mixed with 1-2-4 Bytes, but it is not fully compatible with GB2312.
If this sentence is omitted from the page, the WinXP browser will default to GB18030, and some garbled code will appear in the page.
Generally speaking, there is no need to modify by default.
Thank you for your reading, the above is the content of "HTML example code analysis", after the study of this article, I believe you have a deeper understanding of the problem of HTML example code analysis, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.