Category: 01. Tutorials

https://cdn3d.iconscout.com/3d/free/thumb/free-html-3d-icon-png-download-7578018.png

  • HTML Basic Tags

    HTML tags are the fundamental elements of HTML used for defining the structure of the document. These are letters or words enclosed by angle brackets (< and >).

    Usually, most of the HTML tags contain an opening and a closing tag. Each tag has a different meaning, and the browser reads the tags and displays the contents enclosed by them accordingly.

    For example, if we wrap any text in the paragraph (<p></p>) tag, the browser displays it as a separate paragraph. In this tutorial, we will discuss all the basic tags in HTML.

    Basic Tags

    Heading Tags

    Heading tags are used to define headings of documents. You can use different sizes for your headings. HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any heading, the browser adds one line before and one line after that heading.

    Example

    Following HTML code demonstrates various levels of headings:

    Open Compiler

    <!DOCTYPE html><html><head><title>Heading Example</title></head><body><h1>This is heading 1</h1><h2>This is heading 2</h2><h3>This is heading 3</h3><h4>This is heading 4</h4><h5>This is heading 5</h5><h6>This is heading 6</h6></body></html>

    Paragraph Tag

    The <p> tag offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening <p> and a closing </p> tag.

    Example

    The following example demonstrates the use of paragraph (<p>) tag, here we are defining 3 paragraphs −

    Open Compiler

    <!DOCTYPE html><html><head><title>Paragraph Example</title></head><body><p>Here is a first paragraph of text.</p><p>Here is a second paragraph of text.</p><p>Here is a third paragraph of text.</p></body></html>

    Line Break Tag

    The <br> tag is used to insert a line break in the text. It forces the content after it to appear on the next line. This tag is used whenever you want the text to break into a new line without starting a new paragraph.

    Note: The <br> tag is an empty tag and does not need a closing tag.

    Example

    The following example demonstrates the use of break (<br>) tag −

    Open Compiler

    <!DOCTYPE html><html><head><title>Line Break Example</title></head><body><p>Hello<br>You delivered your assignment on time.<br>Thanks<br>Mahnaz</p></body></html>

    Center Tag

    In HTML, the alignment should be handled using CSS rather than deprecated tags. The <center> tag, previously used to align content to the center of a web page, is deprecated in HTML5. You can use the text-align: center; property of CSS to center text or inline elements.

    Example

    The following example demonstrates how to center a paragraph using CSS:

    Open Compiler

    <!DOCTYPE html><html><head><title>Centering Content Example</title><style>.center-text {
    
         text-align: center;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;This text is not in the center.&lt;/p&gt;&lt;p class="center-text"&gt;This text is in the center.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    Horizonal Rule Tag

    The <hr> tag is used to insert a horizontal line across the page. It is commonly used to separate sections of content visually.

    Note: Like <br> tag, the <hr> tag is also an empty tag and does not need a closing tag.

    Example

    The following example draws a horizontal line between two paragraphs −

    Open Compiler

    <!DOCTYPE html><html><head><title>Horizontal Line Example</title></head><body><p>This is paragraph one and should be on top.</p><hr><p>This is paragraph two and should be at bottom.</p></body></html>

    On executing the above example, you can see a straight line dividing the two paragraphs.

    The <hr /> tag is an example of the empty element, where you do not need opening and closing tags, as there is nothing to go in between them.

    The <hr /> element has a space between the characters hr and the forward slash. If you omit this space, older browsers will have trouble rendering the horizontal line, while if you miss the forward slash character and just use <hr>, it is not valid in XHTML.

    Preserve Formatting Tag

    The <pre> tag is used to preserve the formatting. Whenever you want to display content on the webpage exactly in the same format as it was written in the HTML document, you can use the <pre> tag. It preserves the formatting of source code, including line breaks and indentation.

    Example

    The following example demonstrates the use of the <pre> tag. Here, we are displaying some code that should keep the formatting exactly the same as it is written inside the <pre> tag −

    Open Compiler

    <!DOCTYPE html><html><head><title>Preserve Formatting Example</title></head><body><pre>functiontestFunction(strText){alert(strText)}</pre></body></html>
    function testFunction( strText ){
     alert (strText)
    }
    

    Non-breaking Spaces

    Non-breaking spaces prevent an automatic line break and are displayed using the &nbsp; entity.

    Suppose if you want to use the phrase "12 Angry Men." Here, you would not want a browser to split the "12, Angry" and "Men" across two lines −

    An example of this technique appears in the movie "12 Angry Men."

    In cases, where you do not want the client browser to break text, you should use a nonbreaking space entity &nbsp; instead of a normal space. For example, when coding the "12 Angry Men" in a paragraph, you should use something similar to the following code −

    Example

    The following example demonstrates the use of &nbsp; entity −

    Open Compiler

    <!DOCTYPE html><html><head><title>Nonbreaking Spaces Example</title></head><body><p>An example ofthis technique appears in the movie "12 Angry Men."</p><p>An example ofthis technique appears in the movie "12&nbsp;&nbsp;&nbsp;Angry Men."</p></body></html>

    On executing the above example, it will display the sentence: An example of this technique appears in the movie "12 Angry Men." twice. Since we have added 3 " " characters between 12 and men, the second time, you can observe three spaces.

    Listing Tags

    The <ul> and <ol> tags create the unordered and ordered listings, and to display list items, the <li> tag is used.

    Example

    The following example demonstrates the use of listing tags −

    Open Compiler

    <!DOCTYPE html><html><head><title>Listing Tags Example</title></head><body><h2>Unordered list</h2><ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul><h2>Ordered list</h2><ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul></body></html>

    Print Page

  • Learn everything about HTML Editors in 2025

    HTML editors are used to create, edit, and manage HTML code. In this tutorial, you will learn about the popular HTML editors that can be used to manage your HTML documents. Here, we are explaning the steps to create and run HTML code in the specific editors.

    What are HTML Editors?

    HTML editors are tools/software to create, edit, manage, and run (in some cases) HTML documents. HTML editors provide many features, such as auto-indenting, syntax highlighting, autocompletion, etc.

    You can use any of the HTML editors mentioned below to write and manage your HTML codes. You need to save the file with an extension .htm or .html.

    Types of HTML Editors

    The following are the different types of HTML editors:

    • Text Editors:
      Text editors are the basic HTML editors where you need to write the code manually. These types of editors don’t provide all features required for writing and managing HTML codes. Some of the text editors may include features like syntax highlighting and basic code editing tools.
      Example: Notepad, Notepad++, etc.
    • WYSIWYG Editors:
      WYSIWYG Editors allow you to create web pages visually where you need to write the complete code manually. These types of HTML editors provide designing pages without needing to write code.
      Examples: Adobe Dreamweaver, BlueGriffon, etc.
    • Online HTML Editors:
      The online HTML editors are web-based tools where you can write, manage, and run your HTML codes directly in your browser. These editors often provide live previews of the HTML documents. We provide an online HTML editor that supports syntax highlighting, alignment, code beautification, and many more features. You can use our HTML Editor to write, edit, and manage your HTML code.
    • Integrated Development Environments (IDEs):
      The IDEs provide an integrated development environment where you can write, manage, and debug complete or larger projects. Some of the IDEs are JetBrains, WebStrom, Eclipse, etc.

    Popular HTML Editors in 2025

    There are several HTML editors available to the user (paid and unpaid, both). The following is the list of some popular editors:

    1. Notepad
    2. TextEdit
    3. Notepad++
    4. Sublime
    5. Visual Studio Code
    6. Atom
    7. Brackets
    8. Adobe Dreamweaver CC
    9. CoffeeCup

    1. Notepad

    Notepad is a basic free text editor which is preinstalled in Windows systems. Notepad can be used as an HTML Editor.

    Notepad - HTML Editor

    Steps to Create and Run HTML Code in Notepad

    The following are the steps to create and run an HTML document in Notepad:

    • Open notepad application.
    • Write your HTML code.
    • Save the file with an extension “.htm” or “.html” and set the encoding to UTF-8.
    • Now, you can open this HTML document in any web browser.

    2. TextEdit

    TextEdit is a default text editor and an open-source word processor that comes with MacOS. You can use TextEdit as an HTML editor to create, edit, and manage your HTML code. You can also use it to display HTML documents like you see them in a browser or in code-editing mode.

    The only limitation in TextEdit is that it doesn’t display images when you use it to browse webpages.

    TextEdit - HTML Editor

    Steps to Create and Run HTML Code in TextEdit

    The following are the steps to create and run an HTML document in TextEdit:

    • Open TextEdit
    • Create a new file
    • Go to the “format” then Make Plain Text
    • Write your HTML code
    • Save the with an extension “.htm” or “.html”

    3. Notepad++

    Notepad++ is a free source code editor. It is written in C++ and supports features like, syntax highlighting, limited auto completion for programming, scripting, etc. Notepad++ is one of the best HTML code editors where you can create and manage HTML documents.

    Notepad++ does not come with preinstallation, you need to download it manually from the different devices from its official website: notepad-plus-plus.org

    Notepad++ - HTML Editor

    Steps to Create and Run HTML Code in Notepad++

    To create an HTML document in Notepad++:

    • Open Notepad++
    • Open a new file, write your HTML code, and save the file as “.html”or “.htm”
    • Click on the file and select the browser in which you want to view the results.

    4. Sublime Editor

    Subline editor is a cross-platform source code editor. It is used to write Codes, markup, and prose. It is written in C++ and Python.

    Sublime editor provides features like quick navigation to files, symbols, or lines. It allows you to simultaneously edit multiple selected area.

    Sublime - HTML Editor

    Sublime editor can be downloaded from this link: Sublime Text

    5. Visual Studio Code

    Visual Studio Code (VS Code) is also a source-code editor developed by Microsoft. It supports Windows, Linux, and macOS. VS code is widely used for creating and managing HTML documents due to its amazing features like debugging support, syntax highlighting, code refactoring, intelligent code completion, etc.

    VSCode - HTML Editor

    VS Code is not preinstalled software; you need to download it from code.visualstudio.com/download

    6. Atom Editor

    Atom is an open-source text and source code editor for MacOS. Atom can also be used in Windows systems after downloading and installing. Atom is also a free editor and can be used as an HTML editor where you can create and manage HTML documents. It provides various features such as syntax highlighting, code completion, find and replace, auto detect indentation, and different themes.

    The steps to write and run HTML in the Atom editor are:

    Steps to Create and Run HTML Code in Atom

    • Create/open a file
    • Write or paste HTML code.
    • Save file with “.htm” or “.html” extension.
    • And, press “CTRL + Shift + B” (in Windows) to run and see the preview.

    7. Brackets Editor

    Brackets is a source code editor that can be used for creating and managing HTML documents. Brackets is created by Adobe, and it is useful for web development. Brackets features include auto saving, code beautification, live preview, and many more.

    Steps to Create and Run HTML Code in Brackets

    The steps to create an HTML document in brackets editors are:

    • Download & Install Bracket Editor
    • Create a new file.
    • Write HTML code and save the files with the extension “.htm” or “.html“.

    8. Adobe Dreamweaver CC

    Adobe Dreamweaver CC is a premium IDE application for web development and source code editing, like HTML editors. It offers toolkits for designing and creating websites that combine a visual design interface with a code editor.

    It supports many programming languages like Python and HTML, enabling efficient coding for both beginners and advanced users, and also provides Git support. It is a subscription-based model as it ensures access to regular updates and customer support for assistance.

    9. CoffeeCup

    CoffeeCup is a paid HTML editor software known for its user-friendly interface and powerful features. It offers a range of tools for web development, including code editing, site management, and responsive design support.

    With CoffeeCup, users can create and edit HTML, CSS, and JavaScript code efficiently. It provides live previews, code validation, and an integrated FTP client for seamless website management.

    How HTML Editors can benefit you?

    There are several advantages to using HTML editors to write and manage your HTML codes. Some of the main advantages are as follows:

    • Error Reduction: HTML editors are useful to identify and correct the syntax errors during writing the HTML codes.
    • Syntax Highlighting: Most of the HTML editors come with the syntax highlighting features that enable color-coding to distinguish HTML tagsattributes, and content that makes the code clear and readable.
    • Code Autocompletion: Most of the HTML editors autocomplete the tags or attributes while writing the code. For example, if you start writing a paragraph and type <p>, editors will automatically insert a closing tag </p>. The editors also suggest the syntax of the elements.
    • Code Validation: Most of the HTML editors have code validating features; you don’t need any other tool to validate your code. This feature helps to validate the errors.
    • Collaboration Tools: Some of the HTML editors come with version control systems that make it easier for teams to collaborate and track changes.

    Chapter Summary

    • HTML editors are used to write, edit, and manage HTML codes.
    • There are various types of HTML editors, such as text editors, WYSIWYG editors, online HTML editors, and integrated development environments (IDEs).
    • The popular and widely used HTML editors are Notepad, TextEdit, Notepad++, Sublime, Visual Studio Code, Atom, Brackets, Adobe Dreamweaver CC, and CoffeeCup.
    • These HTML editors provide many features, such as error reduction, syntax highlighting, code completion, code validation, collaboration tools, and more.
  • The History and Evolution of HTML

    HyperText Markup Language (HTML) was initially developed by Sir Tim Berners-Lee in late 1991. It was designed as a standard language for creating and formatting documents on the World Wide Web. All the web pages on the internet are made from HTML.

    From 1990 to 1995, HTML underwent changes and extensions, initially at CERN and then at the IETF. The World Wide Web Consortium (W3C) became the new home for HTML development.

    The Idea of Hypertext Before HTML

    We must first examine the idea of hypertext in order to comprehend the origins of HTML. Early 20th-century pioneers like Vannevar Bush proposed the concept of tying information together through hypertext, envisioning a “memex” machine that could organize enormous volumes of information using linked microfilm.

    However, Ted Nelson, an American philosopher and sociologist, first used the word “hypertext” in the 1960s. Nelson’s idea of hypertext was to develop a network of connected text and multimedia that permitted non-linear information navigation.

    HTML History and Evolution

    The Timeline of HTML’s Evolution

    Here you will see the evolution of HTML over the past couple of decades. The major upgrade was done in HTML5 in 2012.

    YearProgress
    1991Tim Berners-Lee created HyperText Markup Language but it was not officially released.
    1993Tim Berners-Lee created the first version of HTML that was published and available to the public.
    1995HTML 2.0 was released with a few additional features along with the existing features.
    1997There was an attempt to extend HTML with HTML 3.0, but it was replaced by the more practical HTML 3.2.
    1998The W3C (World Wide Web Consortium) decided to shift focus to an XML-based HTML equivalent called XHTML.
    1999HTML 4.01, which became an official standard in December 1999, was the most widely used version in the early 2000s.
    2000XHTML 1.0, completed in 2000, was a combination of HTML4 in XML.
    2003The introduction of XForms reignited interest in evolving HTML itself rather than replacing it with new technologies. This new theory recognized that XML was better suited for new technologies like RSS and Atom, while HTML remained the cornerstone of the web.
    2004A W3C workshop took place to explore reopening HTML’s evolution. Mozilla and Opera jointly presented the principles that later influenced HTML5.
    2006The W3C expressed interest in HTML5 development and formed a working group to collaborate with the WHATWG. The W3C aimed to publish a “finished” HTML5 version, whereas the WHATWG focused on a Living Standard, continuously evolving HTML.
    2012HTML5 can be seen as an extended version of HTML 4.01, which was officially published in 2012.

    From HTML 1.2 to HTML 5 to – How HTML’s Features Evolved Over Time

    With the introduction of new versions of HTML, support for additional features was added, and the user experience was enhanced. The following table shows the features introduced in later versions of HTML:

    Type of ContentHTML 1.2HTML 4.01HTML 5Description
    ImageYesYesYesThe img tag allows to add images to HTML document
    ParagraphYesYesYesParagraph element in HTML is used to represent a paragraph of text on a webpage.
    HeadingYesYesYesHeading are used in HTML to define variable length headings. (h1 to h6)
    AddressYesYesYesAddress element in HTML is used to contain contact information of user.
    AnchorYesYesYesAnchor tag is used to define hyperlink in webpage.
    ListYesYesYesList is used in HTML to display list of related items.
    TableNoYesYesTable is used to organize data into rows and columns
    StyleNoYesYesStyle is used to add CSS styling to webpage
    ScriptNoYesYesScript is used to add JavaScript to HTML.
    AudioNoNoYesEnables introduction of audio to webpage
    VideoNoNoYesEnables introduction of video to webpage.
    CanvasNoNoYesEnables introduction of graphics elements to webpage.
  • What is HTML

    HTML stands for HyperText Markup Language. It is used to structure the content on the web by using various elements (commonly known as tags). These HTML elements define the different sections of a web page, such as headings, paragraphs, links to other webpages, listings, images, tables, etc. These elements tell the browser about the content and formatting to display.

    HTML is HyperText + Markup Language. Where,

    • HyperText refers to the way in which Web pages (HTML documents) are linked together. Thus, the link available on a webpage is called “HyperText”.
    • Markup Language, which means you use HTML to simply “mark up” a text document with tags that tell a Web browser how to structure it to display.

    What is an HTML Element?

    An HTML element is a basic building block to create a webpage, and It is created by a start tag, content, and end tag. In an HTML element, the content is placed between a start and end tag.

    The basic syntax of an HTML element is −

    <tag_name>content</tag_name>

    Consider the following example demonstrates an HTML element −

    <h1>It is top-level heading</h1>

    Here,

    • <h1> is the start tag.
    • It is top-level heading” is the content, which is placed inside the start and end tags.
    • </h1> is the closing tag.

    HTML Page Structure

    HTML page structure (or, HTML basic structure) consists of the essential elements that are required to create an HTML document that can be displayed on the browser.

    The following image shows the page structure of an HTML document −

    HTML Page Structure

    HTML page structure contains <!DOCTYPE html>, <html>, <head>, <title>, <body>, and other tags that will be shown on the homepage.

    Where,

    • <!DOCTYPE html> − It defines the document type as HTML.
    • <html> − It is a root element for an HTML document. All elements are placed inside this element.
    • <head> − The head tag may contain scripts and styles that are useful page functionalities. Meta tags are also placed inside this tag.
    • <title> − It defines the webpage’s title.
    • <body> − It defines the body of the webpage, all elements that are used to display content on the browser placed inside the body tag.
    • <h1> and <p> − The h1 tag defines page heading, and p tag defines paragraph.

    Web Browser Role

    The role of a web browser is to read HTML documents from the given path (either from the server or from a local device) and display it on the webpages. All web browsers, such as Google Chrome, Safari, Firefox, etc., are compatible with reading HTML documents. You can use any of the web browsers to display your HTML document in web format.

    The <!DOCTYPE> Declaration

    The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. The current version of HTML is 5 and it makes use of the following declaration −

    <!DOCTYPE html>

    There are many other declaration types that can be used in HTML documents, depending on what version of HTML is being used. We will see more details on this while discussing the <!DOCTYPE…> tag along with other HTML tags.

    HTML Tags Vs. Elements Vs. Attributes

    HTML tags are the keywords that can be used for a specific purpose to display and format the content on the webpage.

    HTML elements are the basic building blocks that are made with the help of tags and content. An HTML element is created with a start tag, a content, and an end tag.

    And, HTML attributes provide additional information about HTML elements; in order to define or change their behavior. Attributes are used with an opening tag.

    HTML Tags Case Sensitivity

    HTML tags are not case-sensitive. They can be written in uppercase or in lowercase. But the World Wide Web Consortium (W3C) recommends using lowercase tags starting from HTML 4.

    Importance of HTML

    HTML is the fundamental building blocks of the World Wide Web. Any page that you visit on the web contains HTML tags. HTML is important for the various reasons −

    • HTML defines webpage structure and helps to design websites.
    • With the help of CSS and JavaScript, HTML helps to create beautiful and interactive websites.
    • HTML helps in search engine optimization by optimizing the tags based on the targeted keywords.
    • HTML helps to navigate (or browse) different pages and websites from anywhere on the internet.
    • HTML supports user input and forms; you can easily get information from anywhere in the world (you may need background database support for it).
    • HTML follows an open standard by W3C. Thus, HTML supports all browsers on any type of device. You do not need to change the HTML for the different browsers or devices.

    To learn HTML, you will need to study various tags and understand how they behave, while formatting a textual document. Learning HTML is simple, as users have to learn the usage of different tags in order to format the text or images to make a beautiful webpage.