HTML Notes
HTML Notes
Inputs
1. Images in HTML
The <img> tag is used to embed images in an HTML document.
Syntax:
<img src="image.jpg" alt="Description of image" width="300" height="200">
Example:
<img src="example.png" alt="Example Image" width="400" height="300">
2. Videos in HTML
The <video> tag is used to embed video content.
Syntax:
<video width="600" height="400" controls>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Example:
<video width="500" controls>
<source src="sample.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
3. Forms in HTML
Forms are created using the <form> tag to collect user input.
Syntax:
<form action="submit.php" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name">
<input type="submit" value="Submit">
</form>
Example:
<form action="process.php" method="post">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<input type="submit" value="Sign Up">
</form>
Example:
<form>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br>
These examples provide a basic foundation for working with images, videos, forms, and
inputs in HTML.
Do this