Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a hyperlink that has the structure of a web page

Tags:

html

I was listening to Security Now and I could swear that Steve Gibson mentioned that you could define the structure of a page within the hyperlink itself. Ill give you an example, obviously non functional:

<a href="<h1>THIS IS THE PAGE</h1>" target="_blank">This link makes a page</a>

If anyone has an exmple of doing this I would appreciate posting it. Thanks!

like image 583
William T Wild Avatar asked Jan 28 '26 14:01

William T Wild


1 Answers

You can do this by embedding the HTML source in a data: URI.

As an example, paste the following into your address bar. (StackOverflow does no recognize data URIs)

data:text/html;charset=utf-8,%3C!DOCTYPE%20html%3E%3Chtml%20lang%3D%22en%22%3E%3Chead%3E%3Ctitle%3EEmbedded%20Window%3C%2Ftitle%3E%3C%2Fhead%3E%3Cbody%3E%3Ch1%3EI'm%20a%20page!%3C%2Fh1%3E%3C%2Fbody%3E%3C%2Fhtml%3E
like image 108
SLaks Avatar answered Jan 30 '26 08:01

SLaks