HTML Online Editor

Write HTML, CSS and JavaScript and see the page update live as you type. Console, phone and tablet preview, share link and download. Free, no sign-up.

0 total executions (0 this month)
Preview
Console

Test your HTML & CSS with quizzes

Short quizzes with code to read and run: answer, see the explanation, and earn XP and badges.

All HTML & CSS quizzes
Easy HTML Basics

Document Structure & DOCTYPE

Check how an HTML page is put together, from the DOCTYPE to the head and body.

Easy HTML Basics

Text & Headings

Pick the right element for headings, emphasis, quotes and line breaks.

Easy HTML Basics

Links & Images

Write links and images that work, load well and make sense to every user.

Easy HTML Basics

Lists & Tables

Choose the right list type and build tables that are clear and accessible.

Medium HTML Basics

Semantic HTML

Use the elements that say what content is, not just how it looks.

Easy HTML Forms & Accessibility

Form Elements

Learn how forms send data and which control fits each kind of input.

Medium HTML Forms & Accessibility

Input Types & Validation

Use the right input types and built-in validation, and know their limits.

Medium HTML Forms & Accessibility

Labels & ARIA

Give every control an accessible name and use ARIA only where HTML falls short.

How to use the HTML online editor

  1. Write your markup on the index.html tab, your styles on style.css and your code on script.js.
  2. The preview updates as you type. Turn off Auto-run to update it only when you press Run or Ctrl + Enter.
  3. Check how the page looks on a tablet or a phone, and read console.log output and errors under the preview.
  4. Press Share to copy a link with your code, or Download to save one .html file with everything in it.

What you can build

  • Web pages and layouts: practise HTML tags, Flexbox and Grid, and see the result at once.
  • Interactive pages: buttons, forms and DOM changes with JavaScript, with the console right below.
  • Canvas and animations: draw with the Canvas API or animate with CSS.
  • Libraries from a CDN: add a .js or .css link (for example from cdnjs or jsDelivr) with Add library.

Your code runs in an isolated frame: it cannot read this site's data, and nothing is sent to a server unless your own code does it.

Frequently asked questions

How do I run HTML code online?

Type your HTML on the index.html tab and the preview shows the page as you type. Add styles on style.css and code on script.js; they are joined into one page for the preview.

Can I use JavaScript and see console.log?

Yes. Messages from console.log, warnings and errors appear in the Console under the preview, with the line number for errors.

Can I see how my page looks on a phone?

Yes. Use the Phone and Tablet buttons above the preview to see the page at those widths, or Full screen to see it alone.

Can I use libraries like Bootstrap or jQuery?

Yes. Press Add library and paste the https link of the .css or .js file from a CDN such as cdnjs or jsDelivr.

How do I save or share my code?

Your code is kept in this browser. Share copies a link that contains the code, and Download .html saves one file with your HTML, CSS and JavaScript.

Is it safe to run code from a shared link?

The preview runs in an isolated frame that cannot read this site's cookies or data, open windows or leave the page.