In a word; No.
HTML is delivered to users as 'source code', which the user's browser then interprets. There is nothing you can do to protect HTML code; except trying to enforce your copyright if it's stolen.
Also, you can't easily 'scramble' or obfuscate HTML code as you would with other types of code; because even subtle changes will often have some visible effects.
The best you might get, is encrypting the page, saving it somewhere on your server; and responding to requests with a blank page that runs a Javascript function to collect, decrypt and display the page content.
But, as you can't encrypt Javascript programs either, and since you'd have to send a link in the page to a program that can collect and decrypt your pages; it's gonna by like holding sand in a sieve...
Still, you might be able to do some funky business at the server to hide the Javascript code by means of checking the referer in an HTTP header... so that only your pages can link to the JavaScript code. This still has drawbacks; some browsers might let a user see post-JS source code ( and all browsers have to download the code, and most cache it somewhere ); and it's going to greatly increase the loading times for your pages; and the pages' contents will be totally indeterminable by a search engine spider.
Last edited by MattEvans; Apr 19th, 2007 at 10:35 am.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
Offline 1,091 posts
since Jul 2006