Introduction
- We'll create a simple HTML document to display a state name.
- HTML (HyperText Markup Language) is the foundation for structuring web pages.
- It uses elements defined by tags (e.g.,
<p>
for paragraphs) to organize content. - Let's dive into the code!
HTML Code:
HTML
<!DOCTYPE html>
<html>
<head>
<title>State of India</title>
</head>
<body>
<h1>The Name of the State:</h1>
<p>Andhra Pradesh</p>
<p>Arunachal Pradesh</p>
<p>Assam</p>
<p>Bihar</p>
<p>Chhattisgarh</p>
<p>Goa</p>
<p>Gujarat</p>
<p>Haryana</p>
<p>Himachal Pradesh</p>
<p>Jammu and Kashmir</p>
<p>Jharkhand</p>
<p>Karnataka</p>
<p>Kerala</p>
<p>Madhya Pradesh</p>
<p>Maharashtra</p>
<p>Manipur</p>
<p>Meghalaya</p>
<p>Mizoram</p>
<p>Nagaland</p>
<p>Odisha</p>
<p>Punjab</p>
<p>Rajasthan</p>
<p>Sikkim</p>
<p>Tamil Nadu</p>
<p>Telangana</p>
<p>Tripura</p>
<p>Uttar Pradesh</p>
<p>Uttarakhand</p>
<p>West Bengal</p></body>
</html>
Explanation:
<!DOCTYPE html>
: Declares the document as HTML5.<html>
: Root element enclosing all content.<head>
: Contains metadata like the title.<title>
: Specifies the title displayed in browser tabs.<body>
: Encloses the visible content of the page.<h1>
: Creates a large heading for "The Name of the State:".<p>
: Defines a paragraph to display the state name (replace "Karnataka" as needed).
Conclusion:
- This basic HTML structure effectively showcases a state name.
- Save this code as an
.html
file and open it in a web browser to view the result. - For interactivity or dynamic content, explore combining HTML with JavaScript and CSS.
0 Comments