GreX Tutorial : Hello World in HTML
HELLO WORLD IN HTML
Actually, Hello World in programming refers to the first ever project you do when learning a programming language. Now you can understand some memes. LoL! Let's start:
<!DOCTYPE html>
<html>
<head>
<title>First Page Title</title>
</head>
<body>
<p> Hello World!</p>
</body>
</html>
Let me explain what is happening here then next I will tell you how you can create yours.
Code Explained:
-
So, the document starts with THE HTML5 DECLARATION that we considered previously. i.e
<!DOCTYPE html>
-
Then, the next is the html tags. If you look very carefully, you would notice that every other tag goes into these two tags:
<html> </html>
-
Now, every HTML document is divided into two. That is the head and the body: Hence we have the
<head></head> and the <body></body>
-
The head provides information about the body. It basically describes the body. Its contents are not displayed as it only describes the body. We would talk about some important tags of the head later on. Stay with us!
-
The body is where the real work happens. The contents in the body directly affects the display or how the browser displays the web page. It usually contains alot of code. LoL!
-
Now, our
<p> </p>
This is usually called the paragraph tag. You know, p for paragraph. LoL! It allows us to write basically a paragraph or text. Another word we use for text is string. Programmers! It is also an element we use for adding other elements especially when we want to design and arrange element in a particular way. We would learn that later on!
It signifies the beginning and ending of the HTML code. It encloses other tags.
Rounding off, if you notice, we did a lot. Hooray! Firstly, you'll see how each element or tag is placed inside of another tag. That is the essence of the opening and closing tags. This is called NESTING. So, lets move on to WRITING YOUR HTML CODE!
Comments
Post a Comment