Trusted answers to developer questions

How to write "Hello World" in HTML

Get the Learn to Code Starter Pack

Break into tech with the logic & computer science skills you’d learn in a bootcamp or university — at a fraction of the cost. Educative's hand-on curriculum is perfect for new learners hoping to launch a career.

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.

RELATED TAGS

hello world
html
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?