Quantcast
Channel: How to display some HTML by typing it into the address bar? - Stack Overflow
Viewing all articles
Browse latest Browse all 6

How to display some HTML by typing it into the address bar?

$
0
0

Is there a way to have the browser display a given HTML page by pasting the HTML code into the address bar and then typing Enter?Browser is Google Chrome. Unfortunately, if I paste the HTML and then hit enter, it redirects to the Google search site... which is not what I want!


I want to paste the HTML code, such as <html><body>...</body></html>

Another option I thought about is to paste something like

javascript:document.write('<html><body>...</body></html>');

but that appends the HTML to the current page, while I want to reset the page contents instead.


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>