CHAPTER 3 WEB VOCABULARIES Embedding Advertising Information (Web server info)
CHAPTER 3 WEB VOCABULARIES Embedding Advertising Information Many web sites display advertising information on their pages. If the advertisement isn t valid XHTML, you must make sure that you re using the XHTML 1.0 transitional DTD. You can also add the advertiser information to the page using JavaScript. This ensures that the content displays in the browser, but at the same time, you can ensure that the XHTML page is valid. Make sure that you follow the preceding JavaScript guidelines. I ll cover some advanced JavaScript techniques in Chapter 8. Including Unsupported Elements and Attributes In some cases, you may need to add invalid content to the XHTML page. Using unsupported elements isn t good practice, because it ultimately limits your audience. However, there might be times when you want to add Elements or attributes that existed in earlier versions of HTML Elements or attributes that are specific to one browser New elements or attributes The first two situations commonly occur when you re trying to build a web site for a specific browser, or when you re trying to convert an older web site to XHTML. You can add this kind of information in several ways. As I discussed in the previous section, you can add the content using JavaScript after the page loads. Another more complex option is to test for the browser type and version and return appropriate pages to the user. By maintaining templates on the web server, you can quickly transform your web page to support various browsers using XSLT. XHTML Modularization A primary goal of XML is to create a simple markup language that you can extend easily. XHTML 1.1 simplifies the process of extending the XHTML definition. You can add any vocabulary to XHTML through a process called modularization. Although XHTML modularization is complex, you can still enjoy the benefits. The W3C has released a working draft of a modularization that supports the MathML and SVG vocabularies. These two vocabularies are commonly embedded within XHTML and vice versa. You can find out more at http://www.w3.org/TR/XHTMLplusMathMLplusSVG/. You might need to limit rather than extend the XHTML specification. XHTML Basic provides a subset of the basic modules of XHTML for use on mobile devices; find out more at http://www.w3.org/TR/xhtml-basic/. Using these new vocabularies is very similar to using the other document types you ve seen in this chapter. You need to follow the rules of the new document type and declare the appropriate DOCTYPE. The DOCTYPE declaration for XHTML plus MathML plus SVG is
Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services