Online HTML Editor
Type On One Side, See It On The Other
The Online HTML Editor includes two code editors (one for Markup, one for CSS) and a Live Preview. As you write code in either editor, the changes are reflected in the preview in real-time. Also, you can preview the design of your site on mobile devices, tablets, and desktops. The code that you create will remain within your browser.
- FreePrice
- TwoPanes
- NoneSign-up
- NoneUploads
Online HTML Editor
HTML and CSS on one side, a live preview on the other
Ready. Type in either pane and the preview redraws a moment later.
Run it on a test page before the live one
Keep a copy of your original code and try the result on a test page before you replace the live file. No automatic tool can see every way your site uses its code.
Read the full guide
HTML Bold: The b Tag, the strong Tag and CSSWhen to use b, strong or font-weight, and what bold does for SEO. Plus how to fix a page where nearly everything is bold.
13 minutes of reading · video guide inside
What This Online HTML Editor Does
An online HTML editor allows users to create web pages and view them instantly. Users enter HTML into one window and CSS into another. Once the user enters the code, the editor will update the page right away. So, users do not need to save files, change windows, or reload the page each time they make an alteration.
The left side has the code panes while the right side has the preview. Smaller screens will have the code panes placed above the preview. At the top of the screen there is a row of buttons that allow you to set the width of your view to represent how a phone, tablet or desktop would display the same page.
Nothing needs installing. You’ll use your browser as opposed to a coding environment, and you can simply close out of the browser window when you feel satisfied with how your design looks. Also, you will have access to the complete draft in your browser. Since we don’t have a server side of things, a client mock-up or unreleased web page will never reach us.
Under the result, the editor displays a report panel reading your work. This panel counts the number of elements and CSS rules; names the CSS rules that did not match any element; lists the accessibility gaps that the editor was able to find; and finally, lists all of the things that were blocked by the editor. Thus, a page that appears correctly to the user, yet does not function well to the user, will show up as an issue within this report panel rather than being identified as an issue during a future review process.
How The Preview Stays Apart From This Page
The image of what you will see when you click "Preview" is not pasted directly into the page. The editor creates a shadow root, which functions like a private backyard within the browser.
A shadow root keeps styles apart in both directions, as the HTML specification describes. So your h1 rule cannot reach the heading above it, and our stylesheet cannot flatten the card you are building.
That editor is honest because of that wall. You will see your markup based on your rules and none of ours.
The editor transforms your input into actual elements. So, the web browser will render your document as though it was an actual file. This is important when creating a grid or a flexbox row since fake views typically obscure the location of where a row wraps.
Why Scripts Do Not Run Here
The editor will turn off all scripts. We decided to remove that feature intentionally, so there is no missing info. It will strip out script tags, remove on-click attributes and any other event attributes, and refuse JavaScript links.
The first reason for choosing this is because when you have a page that executes your script, you can cause it to function as if the person who sent the script to you was doing so. The second is that when you use an editor which executes code, you cannot guarantee that everything remains within your browser.
So the report will list each handler and each script tag that was removed. This means you will know why a button did not work.
This page isn’t where you want to go if you’re looking for a place to play with JavaScript. Rather than playing around on this site, write the HTML and CSS for your project first, then use your development environment to add the functionality.
Links and forms are both passive because they have the potential to move the current browser window/tab away from the user’s focus when clicked. So, the editor will show a brief message in place of taking the user out of their workflow.
Testing A Layout At Three Widths
The editor is using a width instead of a device name. The preset sizes are 375 pixels for a phone, 768 pixels for a tablet, and 1280 pixels for a computer. You can enter your own width into the "Custom" input box, which will accept any size between 200 and 2560.

Your media queries answer to that width. The editor turns each width-only @media rule into a container query on the preview box. So a breakpoint at 600 pixels fires when the view is 600 pixels wide, even though this page is wider.
The most common/useful width is usually the "custom" width. Somewhere between 320px and 900px, most grid systems have breaks in their layouts. These breaks tend to be located on odd numbers which are not supported by any of the pre-set widths.
A wide page still fits on your screen. The editor scales it down to the space it has, but it keeps the real layout width. Hence the text looks small at 1280, yet it wraps exactly as it would on a desktop.
What The Report Panel Lists
The Report Panel is an option for users that converts the Editor into a fast review tool. After every redraw, the Report Panel reads the Markup and Stylesheet and then documents its findings.

First, there is a count of the number of items on the page, and the number of CSS rules. Then there is a list of the rules which were not applied to any item. When you make a typo in a class name, the browser will ignore the rule without telling you why. So, the panel finds the selector for you.
Following that is the Accessibility Notes section. For each image without alternative text (alt text), each form field without a label, each link containing only an image, and each heading that transitions directly from level two to level four; there will be one line.
The first group includes those tags that can be repaired by a browser (e.g., an unclosed , or a closing tag without an opening tag). The second group lists every script, event handler, remote image, web font, and @import that was blocked. This means if a logo is missing, we know why; it isn’t a mystery.
The Online HTML Editor in Action
This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.
Building A Page Live In The Online HTML Editor
It takes four steps, and not one of them asks you to sign up.
Write the markup
Type into the HTML pane, or pick a sample to start from working code. The preview catches up once you stop typing for a moment.
Style it in the second pane
Next, write the rules in the CSS pane. Since both panes feed the exact same view, any changes you make in either will be reflected in the same location.
Pick a width
In addition to being able to use widths of 375, 768 and 1280 pixels, you can also enter a custom width. By doing this, you will find out about the wrap that occurs only at 420 pixels before other people do.
Read the report, then export
The dead rules should be fixed and the accessibility notes should be updated. Then, you can either create copies of each pane, or download one HTML document that includes both panes.
Reasons To Use This Online HTML Editor
Five reasons, and each one saves a round trip.
The preview cannot touch this page
The editor draws your page in a shadow root, so a stray rule of yours cannot restyle the page around it. Even a wildcard selector stays harmless.
No files come from other hosts
When you view a snippet that was copied from some unknown web site, there will be no way for that snippet to send data back to its owner. So, you are free to create a client mock without concern for tracking devices.
A report, not a blank preview
The editor will often give reasons for why a page appears incorrectly. As an example, the editor would list a blocked image, rather than leave you with nothing but a blank space.
Real widths, real media queries
The editor will lay-out your page based on the width that you selected, which means that your breakpoint fires correctly. A layout designed to fit both 375 and 768 will likely display properly on any screen with either of these two sizes.
One file comes out
The HTML file that is downloaded contains both the markup and the style sheet. So, you may give this file to another person, or you may view it when you do not have access to an internet connection (offline), without having to create the file first.
Habits That Make The Editor Useful
Six habits that turn a scratch pad into a real workflow.
- Start from a sample Load the card grid, the form or the article, then cut it down. A working skeleton beats a blank pane when you only need one component.
- Write the markup first Because the HTML document itself is easily read by browsers, its basic layout appears before any styling rules being applied. So, the role of CSS is simply to position the elements that are already present.
- Give every rule a reason A rule that doesn’t match anything should be deleted right away. The report gives the names of the rules, and a stylesheet without dead rules is significantly simpler to manage.
- Check the narrow width first Begin at 375 pixels and expand from there. Layouts that work on a smaller scale are often more capable of being stretched than vice versa.
- Name classes after the job A name of a class goes to the next design of your site, and names based on size or color age poorly. Use "card-foot," not "grey-small."
- Clear the alt list before you export Fill in every alt text the report asks for. Then the markup leaves the page in better shape than it arrived.
Six Ways A Live Preview Misleads You
Each of these looks fine in the pane and surprises you later.
Trusting a preview that is not the real page
A piece of code that functions properly on its own can malfunction within a template. All previews have this limitation, so you should test the code on the actual website before shipping.
Leaving scripts in and expecting them to run
This editor intentionally removes script tags and event handling from the content. As such, if you find a button that doesn’t do anything in this editor, this is not a problem with the editor, and the report will tell you what was removed.
Forgetting that remote files never load
When building, use a data URI if you want your logo, icon font, or background from another host to be visible; otherwise, leave a blank space for them until you are ready to upload the actual files.
Styling an element that is not there
If you write a rule for a class that isn’t used anywhere in your HTML document, nothing will happen. Your page won’t say anything about it, but the report is the only area where the error is evident.
Testing only at the widest width
Because many of your readers access your content through mobile devices, a desktop-only test will miss most of those readers. This is why the first preset row was created for mobile widths.
Closing the tab with the only copy
The document exists only within your current browser session and will be deleted when you clear your browser’s history. Please download the document once you are satisfied with its appearance.
Online HTML Editor Questions
Does this online HTML editor cost anything?
Yes. There are no sign-ups, caps on usage, or paywalls for using this editor. You may use the editor as often as desired.
What does an online HTML editor do?
A web page where users can input HTML and CSS and view the results in real time. Simply put, this tool allows for immediate visualization of changes made to the HTML and CSS, which eliminates the need to constantly switch tabs to check on the effects of updates.
Will it execute my JavaScript?
The answer is "No." Any script tag, event attribute, or javascript: link has been removed, and the report lists every removal. This means that if a person writes a piece of code, it cannot be run while you view their writing.
Can the preview break this page?
No. It is rendered within a shadow root, so a rule created by you will not affect the page, and a rule created by us will not affect your markup.
Can I load an image from another site?
No. The editor prevents from accessing external resources and the report states that. But a data URI will work as it is contained within the HTML/markup.
Which widths can I test?
Presets will work for the widths of 375px, 768px, and 1280px; but the custom input allows for any width within the range of 200px and 2560px. So, you can work out at what point your grid starts to break.
Do my media queries work?
Yes, for width-based media queries. The editor creates a container query based upon what you selected in the editor for that specific width. For other types of media queries (i.e., print, hover, etc.), they maintain their regular definitions.
What does the report panel check?
It counts elements and CSS rules, and it lists rules that match nothing. It also lists accessibility gaps, tags a browser would repair, and anything it blocked.
Is my markup saved anywhere?
When you close your browser, the draft will be saved. The next time you open the browser, the editor will load the draft. If you clear the browser’s site data, you will lose the draft. So, you should download the draft if you want to save it.
Can I paste markup I did not write?
In other words, the editor removes the sections that could potentially function on behalf of another user before displaying any part of the file. As a result, when you view an unfamiliar portion of the file, it will be safe.
Can I paste a whole page in?
Yes. A full document works. The editor keeps the style blocks from the head, and it renders the body content inside the editor.
Will it tell me my HTML is invalid?
It reports a tag that never closes and a closing tag with no opening tag. A browser repairs both in silence, so the page alone would hide them.
Does it support grid and flexbox?
Yes, the editor creates a "real" box in a "real" browser. So, both layout modes will act exactly as they would when used in a production environment.
Can I copy the code out when I finish?
Yes. Each of the panes have their own download button. Also, the HTML file downloaded contains all two of the panes.
What happens to scripts in the download?
The file contains your markup and style. All script tags will become brief comments and all event attributes will be stripped, resulting in a file that looks exactly like what you previously viewed.
Can I undo an edit in the editor?
Yes, each of the panes are regular text boxes, so, your browser’s "undo" function will work within each of them. If you wish to begin again, select another sample and reload it.
Does it format or minify the code?
We did not use a minifier because we want to keep each panel exactly as you type the spaces in. You should run your final markup through a minifier once it’s complete.
Does it run on phones too, or only on desktops?
Yes. The panes will stack on a small screen, but the editor will still keep the page at the same width. This means that you can fix a wrap when you are away from your desk.
Who owns the markup I write?
Yes, we are not asking for recognition or claiming ownership of this material. So you are free to use it for commercial work here.
Is an account or a browser add-on required?
No. The page works on its own, with no sign-up and nothing to install.
Handy Companion Tools For This Job
Four pages the same job often leads to.
- CSS selector tester
Run a CSS Selector on Markup You Paste, and View What Is Found. This Page Will Name a Selector That Matches No Elements in Your Markup, As It Is Easy to Miss This When Looking at the Markup.
- HTML minifier
After your layout has settled down, take out the extra spaces and all of the comments. Now, the file that you send out contains the actual layout, rather than any comments or explanations that were included with it.
- HTML email previewer
Before sending mail out, look at the way your mail client views it. Your mail client will remove much more from the markup than a web preview would.
- SVG editor
If your page needs an icon or small diagram, simply create and refine the graphic directly on the page. You can then copy and paste the final SVG code into your HTML panel.
Write Markup And Watch It Land
Write the HTML, then style it using the next panel, use the three different width settings to view the results, and read the report. All of these steps are completed within your browser and all of the data remains in your browser.