How to write "Hello World" in HTML

0

How to write "Hello World" in HTML


In this HTML code, we have a basic structure starting with the `<!DOCTYPE html>` declaration, followed by the opening and closing `<html>` tags. Inside the `<html>` tags, we have the `<head>` section where we can specify the title of the web page using the `<title>` tag.

The content of the web page is placed within the `<body>` tags. In this example, we have an `<h1>` (heading) tag that contains the text "Hello, World!".

...

<!DOCTYPE html>
<html>
<head>
    <title>Hello, World!</title>
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

...

To see this HTML code in action, you can create a new HTML file, for example, `hello-world.html`, and copy the code into that file. Then, you can open the file in a web browser, and it will display "Hello, World!" as a heading on the page.

Alternatively, you can also use an online HTML editor or integrated development environment (IDE) to run and preview HTML code. Simply paste the HTML code into the editor, and it will show you the rendered output in real time.

That's it! You've created a simple HTML page that displays "Hello, World!" in a web browser.

Post a Comment

0 Comments
Post a Comment
>
To Top