[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-346442-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-346442-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","basicxhtmltemplate-creating-an-xhtml-template-file","BasicXHTMLtemplate - Creating an XHTML Template File","","A step-by-step guide for creating a basic XHTML template. It instructs users to start a new text file, choose a suitable editor for PC or Mac, and save the file with an .html ending so browsers treat it as HTML. The guide provides a minimal XHTML Strict skeleton, explains how to save it as template.html for future pages, open it in a browser to confirm it renders, and validate it with the W3C validator to ensure cross-browser standards compliance.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/basicxhtmltemplate-creating-an-xhtml-template-file/346442/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/basicxhtmltemplate-creating-an-xhtml-template-file/346442.png","ImageObject",300,407,{"name":42,"@type":43},"River Wang","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-09-22",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",12,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"Which editor should be used on PC and on Mac?","Question",{"text":63,"@type":64},"On a PC, use Notepad++. On a Mac, use Wrangler.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Why must the file be saved with a .html extension?",{"text":68,"@type":64},"The .html extension is used solely so the browser recognizes the file and displays it as HTML code.",{"name":70,"@type":61,"acceptedAnswer":71},"How can the created XHTML template be checked to work correctly?",{"text":72,"@type":64},"Double-click the file to open it in a browser; it should display a web page. If it is blank, the template creation is still correct.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},346442,1790437698,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":22,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":30,"preview_page_count":22,"preview_urls":145},1099514067438,"https://ap-avatar.wpscdn.com/avatar/100002539ee87300030?x-image-process=image/resize,m_fixed,w_180,h_180&k=1780474512215547542","Part 1: Creating a template xhtml file  \nStep 1: Create a new text file.  \nIf you are on a PC, use Notepad++ . If you are on a MAC, use Wrangler. For more detailed instructions, see [http://www.eecis.udel.edu/~yarringt/103/CreatingTextFiles.pdf](http://www.eecis.udel.edu/~yarringt/103/CreatingTextFiles.pdf)  \nIn both cases, you must save the file as a text file, but you must add a . html to the end of the name of the file. This is solely for the browser. With a . html extension, the browser now knows to read and display the file as if it contains html code.  \nStep 2: Type the following into your text file you just created:  \n\u003C!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\"[http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd](http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd)\">  \n\u003Chtml xmlns=\"[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)\" xml:lang=\"en\" lang=\"en\">  \n\u003Chead>  \n\u003Cmeta [http-equiv=](http-equiv=)\"Content-Type\" content=\"text/html;charset=utf-8\" />\u003Ctitle>  \n\u003C/title>  \n\u003C/head>  \n\u003Cbody>  \n\u003C/body>  \n\u003C/html>  \nStep 3: Save the file:  \nWhen you save, save it as template. html. This file, once validated, will be your template for future xhtml pages you are creating. You can copy this file into another file, then modify between the opening and closing body tags to create a new web page.  \nStep 4: Check it in a browser:  \nFind the file on your computer and double-click on it. A web page should pop up in your browser. If it’s blank, you’ve done it right.  \nStep 5: Validate your web page:  \nYou web page must validate using the World Wide Web Consortium standards. The W3C developed xhtml standards so that all the different browsers would read and understand the same html tags. You want to make sure your code follows those standards so that it will display properly on all the browsers. To do this, go to:  \n[http://validator.w3.org/\\#validate_by_upload](http://validator.w3.org/#validate_by_upload)  \n[Use the browse button to find the file you just created.](Use the browse button to find the file you just created.)  \n[Hit the check button.](Hit the check button.)  \nIf you get “Congratulations…” at the top of the resulting page, your page has validated. You now have a template for future use.  \nIf you get errors, there is a problem with your html code. Since so far your file only contains the html code from above, and I know that code validates, it means you’ve got a typo. Open the file, and very carefully check to make sure what you typed in is exactly what I have above.","cbCaiuQOPSXqptBh","https://ap.wps.com/l/cbCaiuQOPSXqptBh","pdf",277862,"English","# Part 1: Creating a template xhtml file\n## Step 1: Create a new text file\n## Step 2: Add the XHTML skeleton\n## Step 3: Save as template.html\n## Step 4: Check it in a browser\n## Step 5: Validate the web page","[{\"question\":\"Which editor should be used on PC and on Mac?\",\"answer\":\"On a PC, use Notepad++. On a Mac, use Wrangler.\"},{\"question\":\"Why must the file be saved with a .html extension?\",\"answer\":\"The .html extension is used solely so the browser recognizes the file and displays it as HTML code.\"},{\"question\":\"How can the created XHTML template be checked to work correctly?\",\"answer\":\"Double-click the file to open it in a browser; it should display a web page. If it is blank, the template creation is still correct.\"}]","BasicXHTMLtemplate - Creating an XHTML Template File | PDF",1790061463,[146],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/d4fb48c1b5f275233d1803ff54206649.webp",983,1272]