Remove all images and stylesheets. Presto chango! All text Web site Seriously, it is that easy, if you've used good coding practices. A styled Web site is nothing more than a long text document with content wrapped in structurally accurate tags. Someone viewing a well formed site (think WCAG - Web Content Accessibility Guidelines - when you're thinking 'well fomed') using a device meant to only handle text (such as text browsers and many mobile devices) will find that such sites degrade very nicely. If you're looking for text-only for the sake of printers, create a print-only style sheet that has - img {display:none} as one of its components. That should surpress the images just fine.
Hi there the_pm, Thanks for the response. I think I get what your saying - effectively just strip the site of the styles and images and layout styles. I am guessing that is done by creating a new style sheet for the text only version - but how would I create a facility to switch the style sheets and also how would I switch it back. If some javascript code is required to switch style sheets, do you know where i could find it and just cut and paste it - i don't know any javascript yet. Thanks
Using javascript you can chamge the src property of the link (that references a stylesheet) tag. I think there will be a button (switch, something that call tha javascript) on your site for this purpose. Best regards,
Hi there Spider, Thanks for the message. Do you know where I can get the code to switch the style sheets ? I don't know any javascript and I would just like to cut and paste the code in. Thanks
Do you want to create a text-only version to which people can switch and remain in this version, or are you looking for people to be able to swap out graphics on a per-page basis, for, say, printing?
Display for web: <link href="file-web.css" media="screen, projection" type="text/css" rel="stylesheet" /> Display for print: <link href="file-print.css" media="print" type="text/css" rel="stylesheet" /> Just disable styles for text only. Feel free to use what ever method using Javascript, PHP, ASP, JSP, to enable, disabled the lines above. I hope that helps.