Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views3 pages

HTML Basic Programme STD Viii

The document contains two basic HTML programs: one for a simple webpage with a heading, paragraph, hyperlink, and image, and another for a student registration form with various input fields. Each program includes explanations of the HTML elements used, such as <head>, <body>, <form>, and <input>. The registration form allows users to enter personal details and submit them, although it currently reloads the page upon submission due to the absence of backend functionality.

Uploaded by

nw613909
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

HTML Basic Programme STD Viii

The document contains two basic HTML programs: one for a simple webpage with a heading, paragraph, hyperlink, and image, and another for a student registration form with various input fields. Each program includes explanations of the HTML elements used, such as <head>, <body>, <form>, and <input>. The registration form allows users to enter personal details and submit them, although it currently reloads the page upon submission due to the absence of backend functionality.

Uploaded by

nw613909
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML BASIC PROGRAMME

1.
<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
<h1>Welcome to My Webpage</h1>
<p>This is a basic HTML program.</p>
<a href="https://www.google.com" target="_blank">Visit Google</a>
<br><br>
<img src="https://via.placeholder.com/200" alt="Sample Image">
</body>
</html>

Explanation:

• <!DOCTYPE html> → Defines the document type as HTML5.


• <html>...</html> → Root of the page.
• <head> → Contains metadata (title, links, etc.).
• <title> → Title shown in the browser tab.
• <body> → Content visible on the page.
• <h1> → Main heading.
• <p> → Paragraph text.
• <a> → Hyperlink.
• <img> → Image tag with a placeholder image.
2.
<!DOCTYPE html>
<html>
<head>
<title>Student Registration Form</title>
</head>
<body>
<h2>Student Registration</h2>
<form>
<label for="name">Full Name:</label><br>
<input type="text" id="name" name="name" required><br><br>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email" required><br><br>
<label for="age">Age:</label><br>
<input type="number" id="age" name="age"><br><br>
<label for="gender">Gender:</label><br>
<input type="radio" id="male" name="gender" value="male"> Male
<input type="radio" id="female" name="gender" value="female">
Female<br><br>
<label for="course">Select Course:</label><br>
<select id="course" name="course">
<option value="html">HTML</option>
<option value="css">CSS</option>
<option value="javascript">JavaScript</option>
</select><br><br>
<input type="submit" value="Register">
</form>
</body>
</html>

this program creates a basic registration form where the user can enter details
and click Register.

Let me break it down for you:

🔎 Explanation of Your Code

• <!DOCTYPE html> → Tells browser you’re using HTML5.


• <head><title>...</title></head> → Page title (shown in the
browser tab).
• <body> → Everything visible on the page.
• <form> → Wraps all input fields together.
• <label> → Text description for each input (improves accessibility).
• <input> → Different fields for text, email, number, and radio buttons.
• <select> → Dropdown menu to pick a course.
• <input type="submit"> → A button that submits the form.

How It Works:

• User types name, email, age, chooses gender, selects a course, and then
clicks Register.
• By default, the form will reload the page when submitted (because
there’s no backend yet).

You might also like