Introduction to HTML
1. Introduction
HTML (HyperText Markup Language) is the standard language for creating web pages. It defines
the structure of a webpage using elements like headings, paragraphs, images, and links.
2. Basic HTML Structure
An HTML document starts with a <!DOCTYPE html> declaration and contains the following key
elements:
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a simple HTML document.</p>
</body>
</html>
3. Common HTML Elements
- Headings: <h1> to <h6>
- Paragraphs: <p>
- Links: <a href='https://example.com'>Click Here</a>
- Images: <img src='image.jpg' alt='Description'>
- Lists: <ul>, <ol>, <li>
- Tables: <table>, <tr>, <td>, <th>
- Forms: <form>, <input>, <button>, <textarea>
4. Sample Program: Simple Webpage with a Form
<!DOCTYPE html>
<html>
<head>
<title>Basic Form</title>
</head>
<body>
<h2>Contact Us</h2>
<form>
Name: <input type='text' name='name'><br><br>
Email: <input type='email' name='email'><br><br>
Message:<br>
<textarea rows='4' cols='30'></textarea><br><br>
<input type='submit' value='Submit'>
</form>
</body>
</html>