문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top