HTML Short Notes
HTML Short Notes
What is HTML?
HTML stands for HyperText Markup Language. It is used to structure content on the web.
- HyperText: Links between pages
- Markup Language: Uses tags to format content.
Common Tags
- <h1> to <h6>: Headings
- <p>: Paragraph
- <a href="">: Link
- <img src="">: Image
- <ul>, <ol>, <li>: Lists
- <div>: Container
- <br>: Line break
Attributes
Common attributes:
- id
- class
- style
- title
- alt (for images)
Example: <p id="intro" class="highlight">Welcome!</p>
Semantic Tags
- <header>: Top of page
- <footer>: Bottom
- <nav>: Navigation
- <section>: Section of content
- <article>: Self-contained content
- <aside>: Sidebar
Forms
Complete HTML Notes (Simplified & Organized)
<form>
Name: <input type="text" name="username">
<input type="submit" value="Submit">
</form>
Media Tags
<audio controls>
<source src="sound.mp3" type="audio/mpeg">
</audio>
<video width="320" controls>
<source src="movie.mp4" type="video/mp4">
</video>
Tables
<table>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>Alice</td><td>20</td></tr>
</table>
Meta Tags
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Comments
<!-- This is a comment -->
Tips
- Tags usually have opening & closing: <tag>content</tag>
- Some are self-closing: <img>, <br>, <input>
- HTML is not case-sensitive, but lowercase is best practice.