Connect with us

Tech

First Code in HTML – For Beginners

Published

on

Creating your first HTML code is one of the greatest ways of approaching the beginning of everything in web development. HTML, that is Hypertext Markup Language is the standard language for creating web pages.

Let’s get started with the below codes when you want to create a fresh first page using HTML.

line1:   <!DOCTYPE html>

line2   <html lang="en">

line3   <head>

line4       <meta charset="UTF-8">

line5      <meta name="viewport" content="width=device-width, initial-scale=1.0">

line6       <title>Hello, World!</title>

line7   </head>

line8   <body>

line9       <h1>Hello, World!</h1>

line10      <p>Welcome to my first HTML page!</p>

line11   </body>

line12   </html>

In the above codes, we have only 12 lines which a user can use to build a simple web page with details such as HELLO WORLD! and the content as Welcome to my first page as you can see in line 10.

However, once the code is completed, you can run this code for example using a code editor.

NOTE:

  • To run this code you need a text editor as stated above.
  • Writing a neat code is the best practice for all beginners.
  • Editors such as Atom and Sublime can also be used.
  • Your file name should have the extension, that is filename.html

 

Source: Thepressradio.com|  Charlton| 2024

Advertisement
Verified by MonsterInsights