<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome in Our Blog </h1>
<p>This is my first blog of HTML .</p>
</body>
</html>
Output:
Explanation:
<!DOCTYPE html>: This declaration specifies that the document is an HTML5 document. It tells the web browser what version of HTML the page is written in.<html>: This tag represents the root of an HTML document. All other elements are nested inside this tag.<head>: This section contains meta-information about the HTML document, such as the title of the page, links to stylesheets, and scripts.<title>: This tag sets the title of the HTML document, which appears in the browser's title bar or tab.<body>: This section contains the visible content of the HTML document, such as headings, paragraphs, images, links, etc.<h1>: This tag represents the main heading of the page. There are six levels of headings (<h1>to<h6>), with<h1>being the largest and most important.<p>: This tag represents a paragraph of text.
When you open this HTML file in a web browser, it will display a page with the heading "Hello, World!" and a paragraph saying "This is my first HTML page."
You can save this code in a file with a .html extension (e.g., index.html) and open it in a web browser to see the result.
No comments:
Post a Comment