Asp. NET programming Introduction The indulgence of the random

Source: Internet
Author: User
Tags format html page html tags net object model version client
Asp.net| programming

In the old valley the villagers lived simply and richly, and there was a steep rock in the valley, legend has it that there is a rich pasture in the mountains, there are many bones under the rock, it is an attempt to climb the Rocky Mountains, to find the legendary pasture of the bones of the people, so people have enacted the law, prohibit climbing mountain rocks, prohibit the discussion and search for legends of the pasture, Claiming that it was the pasture of God, these laws were maintained by old-fashioned elders. One night a wounded man hobbled back to the village, telling the villagers that he had found the legendary pasture and wanted the villagers to follow. But the majesty of the old man and the sanctity of the law suppressed the restless villagers, and the vagrants were executed. A day of disaster befell the valley. Although old-fashioned old people try to preserve the law that is challenged by more and more villagers ' desire for survival. But the riots still took place, as more and more villagers left the dead village, where the old men cursed and stopped the last wagon that had left. Along the road signs left by the rover, the villagers found new pastures. With the heart of Thanksgiving, the descendants of the Wanderer as a prophet, although he had no survival.
--excerpt from Van Loon had's "the Catholic preface"

   tolerance-The Web Client performance layer technology's standard for the consortium

Perhaps Tim Berners-lee in the workplace to create a Web architecture does not think that his graphical web browser gadgets in just more than 20 years, the creation of Google and other commercial giants, the introduction of Jerry Yang, Lee Kai-fu, Heroes of the Times, an exciting story. He had only one intention: the exchange of information.

The web technology, which is the carrier of the text encoding file, is used to connect the two channels of the World Computer Network interconnection, and realize the distribution, acquisition and utilization of the information exchange. It uses hypertext technology (HTML) to realize the connection of information and information, realizes the accurate localization of global information with the Unified Resource location technology (URL), and realizes the distributed information sharing with the new Application layer Protocol (HTTP).

Although the simple dozens of HTML tags have been able to accomplish the fundamental task of client-side technology--showing the content of text messages that are transferred from the server to the Non-linear Information Association--but people need richer multimedia information, GIF is used to store two-dimensional images; RealPlayer and media The player implements audio and video applications in the form of Plug-ins, and Flash provides excellent interactive performance techniques.

As commercial power continues to permeate, and as they drive technological progress, the endeavor of the Berners-lee is the biggest taunt to Tim's-the technology itself is incompatible, restricting. This often means that the old mother may be forced to know the browser in addition to Firefox and IE, forced to allow limited bandwidth to receive dozens of times times the expansion of the spam HTML page, forced to understand the complex JavaScript and cookies concept, forced to install and prevent a variety of rogue plug-ins, Desire makes Berners-lee's pure and quiet thoughts into turbid reality. Insatiable commercial power often requires industry-non-profit organizations to counterbalance, and in the web industry this power is called the World Wide Web Consortium, which presents a set of standards for Web client technology. The so-called web standards refer to Structured page description languages (such as XHTML and XML), interpretative languages (such as CSS), object models (DOM), and scripting languages (such as ECMAScript).

The fundamental starting point of the universal standard is the dream of web systems Engineers-tolerance, its technology to achieve: tolerant programmers, easy to make and maintain, tolerant browser, support for multiple browsers and achieve unified page control, positioning and typesetting; tolerant server and bandwidth, compact and compressed code, tolerant client devices, Support multiple operating systems and non-traditional client devices for complex interactions; tolerate a variety of high-level publishing processes, such as easy search, and tolerant of future technology, so that the site to live longer.

Thankfully, the shift from the traditional HTML to the standard of the web is not too complicated, and the core idea of a web-based standard is to separate the pages into three separate parts: structure, performance, and behavior. Structure description content, performance for typesetting, behavior implementation behavior interaction. But it needs to be soberly aware that even if there is a web of standard-seeking standards, the dominant appeal of the business forces to the rules is not in place, as the latest 7.0 version of IE, which is rumored to have not fully supported the standards of the consortium. This kind of leading appeal to the world to bring smart and fresh, but also trample and destroy the standard. It's hard. Web developers, perhaps they want to use a large number of program branches to achieve tolerance of the dream, but more people laugh and cry, as the Web environment changes, painstakingly product design of the compatible technology is often redundant or even become a bug.

   thousand-Change girl-xhtml+css

HTML is the basic language of the construction page, consisting of a fixed number of tags and loose rules, can describe the content of information, but also can be typesetting and modification, simple and easy to learn. But if you often want to extract information from other pages (such as the Search engine's page classification index), you will find out from the HTML in the bones of the loose smell can make people how irritable, HTML page is almost a file conversion black hole-easy to enter difficult!

This is the focus of XML (extensible Markup Language), which also derives from SGML, as well as HTML. Single common file format, self-describing, easy to expand, data consistency and automatic conversion five features to make it a suitable carrier of data exchange between heterogeneous systems, we can see its figure in the web, such as RSS reader, Flash, etc., but the global existing 80G HTML pages cannot be made into XML overnight, so the page description Language--xhtml the Zeldman designing with WEB standards, a "gentle, friendly way to upgrade," appears in the book.

Wearing the X hat HTML is just a modest modification of the traditional HTML, the first is to follow the XML syntax rules to write HTML code, namely:

• Start with the right DOCTYPE and name space

• Use meta content elements to declare your content encoding language

• Write all elements and attribute names in lowercase letters

• Quotation marks for all attribute values

• Assign a value to all of the generic parts

• Close all labels

• Close empty labels with spaces and slashes

• Do not use "--" in the annotation content

• Make sure to use < and & to indicate less than number and number

Moreover, if you analyze and plan your HTML pages carefully, it is often found that each page has similar blocks of content, such as logo and site name, master page content, site navigation, submenu, search box, ribbon, footer, the same block structure is called the page structure, or semantics. HTML is only a format language and cannot describe the page structure, so in XHTML, you typically use the <div> tag to define these structures and identify them with IDs. The following example is an instance of a structured web page (note that a large number of definition codes are deleted due to space limitations).

<HTML> <body>
<div id= "Divheader" > example </div>
<div id= "Divlogin" ><form id= "Frmlogin"
<p id= "Lblaassist" Enter your username and password: </p>
<li> <input id= "txtUserName"/> </li>
<li> <input type= "Submit" id= "Btnlogin"/> </li>
</form> </div>
<div id= "Divfooter" >copyright 2006 by Old Yan </div>
</body> </HTML>
So far we have not mentioned any of the film thanks of Web page layout, which is not very suitable for many beginners, they often first layout after the content. But the separation of content and performance is one of the fundamental essentials of the standard of the consortium: avoid even the page layout code in HTML, which is left to the stylesheet (cascading style Sheets).

CSS for Web page girl makeup (such as fonts, colors, space, not widely supported CSS2 even support visual, hearing, Braille and other devices), generally saved in the external. css file. An external style sheet lets you control multiple-page styles and layouts by editing a standalone CSS file, and you even design multiple stylesheets for the same Web site and dynamically load the thousand-variable effects.

CSS syntax is not complex, and its important mission is to use CSS layout to replace most of the current web use of the bloated table typesetting method, that is, all the Web objects are placed in the box, through the control box properties to complete the layout of the page design, box structure as shown below. But the annoying, mainstream IE6.0 and Firefox 1.x have different details for the box model and may produce inconsistent typography, and you can circumvent the problem with a few tricks, but similar techniques may be a bug in a future browser.


   Tree-dom and ECMAScript

Traditional HTML page tags like a group of wild children scattered, so the Web Page object model (Document object models) to provide a unified application programming interface. The DOM is designed to be multilayered (currently used primarily for two tiers): Level 1 includes kernel, HTML, and XML document models; Level 2. Includes the Stylesheet object model, which defines the functional interface for manipulating style information attached to a document.

The DOM depicts an HTML or XML document as a tree-type data structure, with each node of the subtree represented as an HTML tag or text item within an HTML tag. The tree structure accurately describes the correlation between tags and text items in HTML documents. You can manipulate any label in the document by modifying the NodeValue attribute value that the associated tree node has, or you could easily start from anywhere on the page, and navigate the document in the form of the trees on the top (parent), down (child), and One Direction (sibling). In addition, DOM technology allows us to manipulate the tree structure of the document, including creating, deleting, and moving nodes.


Dom based ECMAScript is a web scripting language standard in the unified arena. The so-called scripting language is embedded into HTML files and interpreted by the browser to increase interactivity and reduce server pressure, object-based (object) and event-driven (driven). But JavaScript and JScript, the half-brother, have long been discriminated against, and programmers laugh that they have little to add to the web, even though programmers spend a lot of time writing form validation scripts, Users can disable and bypass validation just by clicking in the browser. What's even more maddening is that each version of JavaScript is pair, but the programmers are suffering!

Although the recent advent of Ajax technology, let the JavaScript old tree issued a sprout, fire! But can I rest assured that the site is based on a fragile foundation? NetEase's 126 mailbox recently revised, known as the speed, but closed JavaScript even the mailbox operation interface are not out, old mother can know the reason inside? A long time ago to see such a warning: Do not rely on JavaScript, alas, I hesitate, wandering in ...



Related Article

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.