XHTML DHTML SHTML, these three terms are often seen when learning website production, and few articles explain them in detail. In this article, we will sort them out to understand their differences.
XHTML:
HTML is a basic WEB web page design language. XHTML is a markup language based on XML. It looks somewhat similar to HTML, with only some small but important differences. XHTML plays a role similar to HTML. XML, so essentially, XHTML is a transitional technology that combines (somewhat) the power of XML with (most of) the simplicity of HTML.
At the end of 2000, the international W3C (World Wide Web Consortium) organization announced the release of XHTML version 1.0. XHTML 1.0 is a new language optimized and improved on the basis of HTML 4.0, aiming at XML-based applications. XHTML is an enhanced HTML, and its scalability and flexibility will adapt to more needs of future network applications. Below are answers to common basic questions about XHTML from Steven Pemberton, chairman of the W3C's HTML Working Group.
(1) XHTML solves the problems of HTML language that seriously restrict its development. There are three main shortcomings in the development of HTML today: it cannot adapt to the needs of more and more network devices and applications. For example, mobile phones, PDAs, and information appliances cannot directly display HTML; because the HTML code is not standardized and bloated, the browser needs to be smart enough and HTML can be displayed correctly only if it is complex; data and performance are mixed, so if you want to change the display of your page, you must re-create the HTML. Therefore, HTML needs to develop to solve this problem, so W3C formulated XHTML. XHTML is a bridge from HTML to XML.
(2) XML is the development trend of the web, so people are eager to join the XML trend. XHTML is the current standard that replaces HTML4 markup language. Using XHTML 1.0, as long as you carefully follow some simple rules, you can design a page that is suitable for both XML systems and most current HTML browsers. What this means is that you can design to use XML immediately without waiting for people to use XML-capable browsers. These guidelines can smooth the transition to XML on the web.
(3) Another advantage of using XHTML is: it is very strict. The current bad situation of HTML on the Internet is shocking. Early browsers accepted private HTML tags, so people had to use various browsers to detect the page after the page was designed to see if it was compatible. There were often many inexplicable differences. , people had to modify the design to accommodate different browsers.
(4) XHTML can interact well with other XML-based markup languages, applications and protocols.
(5)XHTML is part of the Web standards family and works well on other user agents such as wireless devices.
(6) In terms of website design, XHTML can help you get rid of the bad habit of presentation layer code and help you develop the habit of tag verification to test the working of the page.
DHTML:
DHTML is just a concept for making web pages. In fact, no organization or institution has launched the so-called DHTML standard or technical specification. DHTML is not a technology, standard or specification. DHTML is just a design concept that integrates existing web page technologies and language standards to create a web page that can still change the effect of page elements in real time after downloading.
DHTML roughly includes the following web technologies, standards or specifications:
There is nothing to say about HTML 4.0, the basic language standard for web pages.
CSSL Note! It is not CSS, it is CSSL. It is the abbreviation of Clent-Side Scripting Language, which is translated as "client-side scripting language". It mainly includes JavaScript (JS), VBScript (VBS), and JScript. Netscape mainly supports JS, and IE mainly supports JS, VBS and JScript.
The abbreviation of DOM Document Object Model, translated as "Document Object Model", is one of the web technology standards that W3C has been vigorously promoting recently. It abstracts the content in the web page into objects, and each object has its own properties (Properties) and methods (Method). ) and events (Events), these can be controlled through the CSSL mentioned above. The object models of IE and NS are generated based on the DOM published by W3C, plus their own Extended Object.
CSS is the abbreviation of Cascading Style Sheets, and it is also the theme of this website 52CSS.com. It is an auxiliary design specification for HTML, which is used to make up for the shortcomings caused by the limitations of HTML in typesetting. It is part of the DOM. In theory, you can create any page visual effect you want by dynamically changing CSS properties through CSSL.
Therefore, to put it simply, to implement DHTML, it is based on HTML, using DOM to objectify page elements, and using CSSL to control the CSS properties of these objects to achieve the dynamic visual effects of the web page.
SHTML:
When asked about the difference between SHTML and HTML, if I explain it in one sentence: SHTML is not HTML but a server API, and shtml is HTML dynamically generated by the server.
Although both are hypertext formats, shtml is a file used in SSI technology. That is, Server Side Include--SSI server side includes instructions. If the Web Server has SSI function (most (especially based on Unix platform) WEB servers such as Netscape Enterprise Server support SSI commands). Special treatment will be given to shtml files. Scan the shtml file first to see if there are no special SSI instructions. If so, interpret the SSI command according to the Web Server setting rules. After the explanation, drop the client together with the normal html.
SHTML uses the html file extension of SSI (Server Side Include). SSI (Server Side Include), usually called "server-side embedding" or "server-side include", is a server-based web page production technology similar to ASP. .
How SSI works:
You can use the Server-Side Include (SSI) directive to include text, graphics, or application information into a web page before sending the content to the browser. For example, you can use SSI to include a time/date stamp, a copyright statement, or a form for customers to fill out and return. Using include files is an easy way to include text or graphics that appear repeatedly in multiple files. Instead of typing content into all files, just put the content into one include file. The include file is called with a very simple statement, which instructs the Web server to insert the content into the appropriate web page. And, when you use include files, all changes to your content only need to be done in one place.
Because files containing SSI directives require special handling, all SSI files must be given the SSI file extension. The default extensions are .stm, .shtm, and .shtml
The web server processes SSI instructions while processing web pages. When the Web server encounters an SSI directive, it directly inserts the contents of the containing file into the HTML web page. If the "include file" contains an SSI directive, this file is also inserted. In addition to the basic instructions for including files, you can use SSI instructions to insert information about a file (such as its size) or to run an application or shell command.
A problem often encountered in website maintenance is that the structure of the website has been fixed, but a large number of web pages have to be redone in order to update a little content. SSI provides a simple and effective way to solve this problem. It places the basic structure of a website in several simple HTML files (templates). All we have to do in the future is to pass the text to the server and let the program Automatically generate web pages based on templates, making it easy to manage large websites.
Therefore, the purpose of pages using SHTML format is similar to that of ASP, but because it is an API, it runs faster and more efficiently. It is faster than ASP and slower than HTML, but because server-side includes can be used, it makes page updates easier (especially Batch update banner, copyright, etc.), imagine that you have a piece of HTML, and you want to insert some special server-side scripts in the middle, such as inserting other HTML paragraphs. You choose ASP to complete this task, but if the task is more arduous, more work is needed. If you use SHTML instead of ASP, the processing time may be only 4s.