INTRODUCTION TO HTML
HTML, which stands for HyperText Markup Language, is the standard markup language used to create web pages. It provides the structure and content of a web page, defining how the page should look and how its content should be organized. In this blog, we'll introduce you to HTML with an example program.
To get started with HTML, all you need is a text editor and a web browser. You can use any text editor to write your HTML code, and you can view the resulting web page in any web browser.
Let's start with a simple HTML program that creates a basic web page:
<!DOCTYPE html><html>
<title>Page Title</title>
</head>
<body>
<h1>Welcome to My First Web Page!</h1>
<p>This is my first web page, created with HTML.</p>
</body>
</html>
This program defines an HTML document that contains a title, a heading, and a paragraph. Let's take a closer look at each part of the program.
The "<!DOCTYPE html>" declaration at the beginning of the document tells the web browser that the document is an HTML document.
The "<html>" element defines the root of the HTML document. All other elements in the document should be nested inside this element.
The "<head>" element contains metadata about the document, such as the document title. The "<title>" element specifies the title of the document, which is displayed in the browser's title bar.
The "<body>" element contains the content of the web page. This is where you would put the text, images, and other content that you want to display on the page.
The "<h1>" element is a heading element that specifies a level one heading. Headings are used to organize the content of the page and give it structure.
The "<p>" element is a paragraph element that specifies a paragraph of text. This is where you would put the main content of the page.
To view this web page, save the code to a file with an .html extension and open it in a web browser. You should see a web page that displays the heading "Welcome to My First Web Page!" and the paragraph "This is my first web page, created with HTML."
Conclusion
HTML is a powerful and versatile markup language that is used to create web pages. Its focus on structure and content make it an essential part of web development. We hope this example program has given you a taste of what HTML can do, and we encourage you to explore further and see what else this language has to offer.
Share Your Feedback Here !!