How the live preview works
Your code is placed in an <iframe> through its srcdoc attribute, so the browser renders it as a separate document without saving a file or contacting a server. The preview refreshes 300 ms after you stop typing, which avoids reloading scripts on every keystroke; Refresh preview forces an immediate reload.
You can paste a complete page starting with <!DOCTYPE html> or just a fragment such as a table or a form. Fragments are wrapped in a minimal document with <meta charset="utf-8"> and a responsive viewport tag, so accented characters display correctly and the Phone 375 width behaves like a real phone instead of a zoomed-out desktop page.
The counter under the editor shows lines, characters, UTF-8 bytes and opening tags. Bytes matter when HTML is embedded in email (many clients clip messages over about 102 KB) or stored in a size-limited database column.