How to Use HTML
A Beginner's Guide to Web
Development
Introduction to HTML
• • HTML stands for HyperText Markup
Language.
• • It is the standard language for creating web
pages.
• • HTML uses tags to define elements on a
webpage.
Basic Structure of an HTML
Document
• <!DOCTYPE html>
• <html>
• <head>
• <title>Page Title</title>
• </head>
• <body>
• Content goes here.
• </body>
• </html>
Common HTML Tags
• • <html>: Defines the root of the document.
• • <head>: Contains metadata and links.
• • <body>: Contains the content of the
webpage.
• • <p>: Defines a paragraph.
• • <h1> to <h6>: Headings from largest to
smallest.
Attributes in HTML
• • Attributes provide additional information
about elements.
• • Examples:
• - <a href='https://example.com'>Link</a>
• - <img src='image.jpg' alt='Image
description'>
Formatting Text
• • Use tags to format text:
• - <b>: Bold
• - <i>: Italic
• - <u>: Underline
Lists in HTML
• • Ordered List (<ol>):
• <ol>
• <li>Item 1</li>
• <li>Item 2</li>
• </ol>
• • Unordered List (<ul>):
• <ul>
• <li>Item 1</li>
• <li>Item 2</li>
Adding Links and Images
• • Links:
• - <a href='https://example.com'>Visit
Example</a>
• • Images:
• - <img src='image.jpg' alt='Description'>
Tables in HTML
• • Use <table> to create tables:
• <table>
• <tr>
• <th>Header 1</th>
• <th>Header 2</th>
• </tr>
• <tr>
• <td>Data 1</td>
• <td>Data 2</td>
Forms in HTML
• • Forms collect user input:
• <form action='/submit'>
• <input type='text' name='username'>
• <button type='submit'>Submit</button>
• </form>
Best Practices
• • Use proper indentation.
• • Close all tags.
• • Use semantic tags (e.g., <header>, <footer>,
<main>).