HTML Editors - HTML Tutorial

HTML Editors: The HTML editor is a tool for writing HTML. When using an HTML editor, edit the theme, index, custom window, and choose to add a search page.

HTML Editors



 HTML using Notepad


The following are  HTML editors dedicated to editing HTML:
If you are beginner then you go to sublime text.

We believe that using a simple text editor is a great way to learn HTML.

Write HTML Using Sublime or Notepad++

Step 1:


Steps to open Sublime (on Windows systems):
  1. Open the Start menu
  2. Select "All Programs"
  3. Select "Sublime"

Step 2: Edit the HTML using Sublime

Enter the HTML code in Sublime:

HTML Editor

Step 3: Save your HTML

Click on File menu

Select Save As from the menu and save with .html or .htm extension.


HTML Save Document


Step 4: Run the HTML file in browser like Chrome or Mozilla



Launch your browser and select the "Open File" command from the "File" menu, or double-click on your HTML file directly in the folder.
The running display results are similar to the following:


HTML Preview

HTML debugging

HTML Corrections


There are usually two main types of errors when writing HTML code:
  • Syntax error: The program cannot run due to a misspelling; it is usually easy to fix after familiarizing yourself with the syntax and understanding the error message.
  • Logical error: There is no syntax error, but the code does not work as expected; usually a logical error is more difficult to fix than a syntax error because the information pointing to the source of the error cannot be obtained.
HTML itself is not prone to syntax errors because the browser is running in loose mode, which means that the browser will continue to run even if there is a syntax error. Browsers usually have built-in rules to parse tokens that are written incorrectly, so even if they don't match expectations, the page can still be displayed. Of course, there are hidden dangers.

Note: The reason why HTML is parsed in a loose manner is because the initial intention of Web creation is that everyone can post content without tangling the code syntax.

Instance

Let's discuss it with a piece of HTML code that contains errors:

HTML Errors

Here are the issues with the above code:
  • Paragraph and list item elements do not have an end tag. But because the end of the element and the beginning of the other are easy to infer, there is not too much rendering error in the above image.
  • The first <strong>element has no end tag. This is serious because the position at which the element ends is difficult to determine. In fact, all the remaining text is bold.
  • Second <li>there is the problem of nested elements: For the " <strong>focus (strong) <em>emphasis (strongly emphasized)? </strong>This is what the hell? </em>" Browser is difficult to make a correct interpretation, ditto.
  • hrefThe attribute is missing a double quote. This led to one of the most serious problems: the entire link was not rendered at all.
 But the browser will try to fix the code error:
  • <p>And the <li>element is added with a closing tag.
  • The first one <strong>does not explicitly close the tag, so the browser completes all subsequent independent blocks <strong></strong>.

  • The browser fixes the nesting error like this:



You will write code like below


HTML Corrections

After reading the example above, you will find the importance of maintaining a good HTML format.