Say Hello to HTML Elements
First, you'll start by building a simple web page using HTML.
Here are some steps
- Open your notepad to windows.
- H1 is the element of HTML. Below code print Hello World in the browser.
<!doctype html>
Output of the Code |
<html>
<head>
</head>
<body>
<h1> Hello World</h1>
</body>
</html>
The above code shows Hello World in the browser. H1 is known as Heading Element in HTML.
- Save the file with a .html extension Like filename.html.
- Open this file into the web browser.
Let's understand the code that we wrote above, Browser must understand which version of HTML we use for this problem we use
<!doctype html> helps to tell the browser that we are using the current version of HTML.
<Html> tag helps to telling our HTML document start there.
<Head> tag helps to connected the CSS and JavaScript.Right now, it's blank. we use head tag later on.
<Body> tag: Inside the body tag we wrote the body of HTML. whatever you wrote its shows in the browser.
we must ensure each tag must be close with the help of a forward slash with the name of an element.
We you have any doubt let me know :)