Basic document of HTML
The Declaration <!DOCTYPE html> is most important in html document it should be declared on top of the html document.
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Codingwith Anas</title>
</head>
<body>
<h1>Codingwith Anas Heading</h1>
<p>Codingwith Anas Paragraph</p>
</body>
</html>
Explaination of given code
- The Declaration <!DOCTYPE html> is used to define that you are using the document of HTML-5.
- The Element <html> is the root of the HTML page.
- The Element <head> contains meta and title.
- The Element <title> is used to specify the page title.
- The Element <body> defines the body document, It is a container for all visible contents Ex: Headings, Paragraphs, Links, Images and many more.
- The Element <h1> is defined to display Heading.
- The Element <p> is defined to display Paragraph.