Open Notepad.
<!doctype html>
<html>
<head>
<title>My First Webpage</title>
<meta charset=”utf-8″ />
</head>
<body>
Hello World !
</body>
</html>
Explanation:
- At first, specify the doctype. <!doctype html>
- Then create html tag. <html> = <name_of_the_tag>. “/” defines the end of the tag.
- Create head between html tags. <head> </head>
- Give a title between head tags. <title> My First Webpage </title>
- Specify character type inside meta tag. Character type (charset) followed by equal sign (=), then value (utf-8). <meta charset=”utf-8” />. value may vary from country to country.
- Closing head tag.
- Then create body. <body> </body>
Watch the tags below:
- <!doctype html>
- <html>
- <head>
- <title>My First Webpage</title>
- <meta charset=”utf-8″ /> as like as <meta value = “name” />. <meta charset = “utf-8” /> and <meta charset = “utf-8 > both are same.
- </head>
- <body> Hello World !
</body>
</html>