How to Extend Custom Template Tags in XHTML
The common template used for XHTML validation contains the information for each tag you place in your page code. You can edit this template and add a custom tag you want to use in your code. This extends the template to validate your custom tag, so browsers do not reject the tag and throw an error when users open the Web page.
Instructions
-
-
1
Open a Web browser and download the basic DTD template file that contains the standard XHTML tags. Using this template to add your own tag eliminates the need to fully recreate the standard DTD file for standard tags.
-
2
Right-click the downloaded file and select "Open With." Click "Notepad" to open the file in Notepad, so you can edit and add your custom tag.
-
-
3
Locate the section labeled "<!ELEMENT." This section lists each tag for XHTML validation. You append your custom tag to the end of the tag list in this section.
-
4
Add your custom tag. The following code is an example of a custom tag addition named "mytag":
<!ELEMENT mytag - O (%inline;)*> -
5
Save the file and upload it to your Web host. You link this file in your XHTML pages. Add the following code to the top of your page code, replacing "site.com" with your own domain and "filename.dtd" with the name of the new DTD template.:
<!DOCTYPE HTML SYSTEM "http://site.com/filename.dtd">
-
1