0

I recently came across an article where if you enter

data:text/html,%20<html contenteditable>

into the address bar of a browser that supports HTML5, you can type in the window.
I managed to figure out that with this you can basically write html in the address bar (it would be rather cumbersome) but I do not understand how or why it works. What are the other functionalities of this command?

  • could you please point to the article you refer? – gnat Sep 12 '14 at 13:10
4

The first part - data:text/html - is a Data URI that tells the browser that what follows is html, and it should parse it.

The second part - <html contenteditable> - is the actual html, an editable html element. In HTML5 you can make any element editable with the contentEditable attribute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.