HTML Learning Notes - Day 1 to Day 4
Day 1: Introduction to HTML
What is HTML?
- HTML stands for HyperText Markup Language.
- It is used to design the structure of web pages.
Basic Structure of HTML:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
Content goes here
</body>
</html>
Explanation:
- <!DOCTYPE html>: Defines the HTML5 document.
- <html>: Root of the HTML document.
- <head>: Contains meta info, title, etc.
- <title>: Title of the web page shown in tab.
- <body>: Main content area shown in browser.
Day 2: Headings, Paragraphs, Line Breaks
1. Headings: <h1> to <h6>
<h1>Heading 1</h1> to <h6>Heading 6</h6>
2. Paragraphs: <p>
<p>This is a paragraph.</p>
3. Line Break: <br>
<p>This is first line.<br>This is second line.</p>
4. Horizontal Line: <hr>
<p>Text above line</p>
<hr>
<p>Text below line</p>
Day 3: Text Formatting & Comments
1. Bold Text: <b> or <strong>
2. Italic Text: <i> or <em>
3. Underline: <u>
4. Superscript: <sup>2</sup>
5. Subscript: H<sub>2</sub>O
6. Highlight: <mark>
7. Small Text: <small>
8. Comments: <!-- This is a comment -->
Day 4: Images, Links, and Buttons
1. Image: <img src="url" alt="text" width="300">
2. Link: <a href="[Link]
3. Button: <button>Click Me</button>
Example:
<img src="[Link]" alt="Photo">
<a href="[Link]
<button>Subscribe</button>