Introduction to Hello World Program in HTML



“Hello, World!” is a simple program that displays the phrase “Hello, World!” on the screen. It is often used as a beginner’s introduction to a programming language, serving as a basic demonstration of the language’s syntax and structure. The program is typically the first thing new programmers learn to write, symbolizing the first step in learning a new programming language.

A simple “Hello, World!” in HTML can be written like this:

Explanation:

  • <!DOCTYPE html>: Declares the document type and version of HTML.
  • <html>: The root element of the HTML document.
  • <head>: Contains metadata, such as the character set and title.
  • <title>: Sets the title of the webpage (displayed in the browser tab).
  • <body>: Contains the content of the webpage.
  • <h1>: A header element that displays “Hello, World!” in a large font.