Summary -
In this topic, we described about how to create a first webpage in HTML5.
To start coding HTML5, we need a text editor and a web browser. In this topic, we learn of creating our first HTML page.
Create First HTML Document –
In this procedure, we will see how to display the below message on the webpage.
“Hello World.. Welcome to TutorialsCampus..!”
Follow the below steps to create a HTML file and displays the above message on the webpage.
Step 1 - Creating the HTML file
Open plain text editor and create a new file.
Step 2 – Place HTML code on the editor
For our example, use the below code -
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML5 Webpage</title>
</head>
<body>
<p> Hello World.. Welcome to TutorialsCampus..!<p>
</body>
</html>
Step 3 - Save the file
Now save the file with ".htm/.html" extension. For example, Save it as "myfirstwebpage.htm".
Next open the file in browser or double click on the myfirstwebpage.htm page to view the output on the webpage.
Explaining example code -
The first line of the webpage <!DOCTYPE html> is the document type declaration. It specifies the web browser that the document is an HTML5 document. The statement is case-insensitive.
The <head> element contains the tags that provides information about the webpage document.
The <body> element contains the actual content of the webpage like paragraphs, links, images, tables, and so on,. that are displayed to the user.