How to write "Hello World" in HTML

The first step to getting familiar with a new language is to write a simple “Hello World” program. HTML (Hypertext markup language) is the text-based approach used for defining web-page layouts.

svg viewer

Code examples

In the code below, a simple boilerplate code for HTML is included, and we can directly write “Hello World” within the <body> tags or use different HTML elements for this purpose such as paragraph tags, bold tag, heading tags etc.

Let's consider another example where we write "Hello World" in different sizes. For this purpose, we will use heading tags.

Copyright ©2024 Educative, Inc. All rights reserved