M.

Home / Software Development Content

HTML Beginner Course

  1. HTML Introduction
  2. HTML Structure
  3. HTML Headings
  4. HTML Paragraphs
  5. HTML Text Formatting
  6. HTML Block and Inline Elements
  7. HTML Lists
  8. HTML Tables
  9. HTML Links
  10. HTML Attributes
  11. HTML Images
  12. HTML Self-Closing Elements
  13. HTML Video
  14. HTML Audio
  15. HTML Buttons
  16. HTML Forms: Text Fields
  17. HTML Forms: Text Area
  18. HTML Forms: Radio Buttons
  19. HTML Forms: Check Boxes
  20. HTML Forms: Drop Downs
  21. HTML Favicon
  22. HTML Symbols
  23. HTML Emojis
  24. HTML Semantics
  25. HTML iFrame/Youtube

Introduction to HTML

Syntax:


            
    <!DOCTYPE html>
    <html>
    <head>
        <title>Page Title</title>
    </head>
    <body>
        <p>This is a paragraph.</p>
    </body>
    </html>
            

Exercise:


HTML Structure

Syntax:


            
    <!DOCTYPE html>
    <html>
    <head>
        <title>My Webpage</title>
    </head>
    <body>
        <h1>Welcome to My Webpage</h1>
        <p>This is an example of HTML structure.</p>
    </body>
    </html>
            

Exercise:


HTML Headings

Syntax:


            
            <h1>Main Heading</h1>
            <h2>Subheading</h2>
            <h3>Sub-subheading</h3>
            

Exercise:


HTML Paragraphs

Syntax:


            <p>This is a paragraph of text. HTML paragraphs are block-level elements.</p>
            

Exercise:


HTML Text Formatting

Syntax:


            <strong>Bold text</strong>
            <em>Italic text</em>
            <b>Bold text (less semantic)</b>
            <i>Italic text (less semantic)</i>
            

Exercise:


HTML Block and Inline Elements

Syntax:


            <div>
              <h1>Block Level Element</h1>
              <p>This is a paragraph inside a div.</p>
            </div>
            

Exercise:


HTML Lists

Syntax:


            <ul>
              <li>Item 1</li>
              <li>Item 2</li>
            </ul>
            
            <ol>
              <li>First item</li>
              <li>Second item</li>
            </ol>
            

Exercise:


HTML Tables

Syntax:


            <table>
              <tr>
                <th>Header 1</th>
                <th>Header 2</th>
              </tr>
              <tr>
                <td>Data 1</td>
                <td>Data 2</td>
              </tr>
            </table>
            

Exercise:


Syntax:


            <a href="https://www.example.com" target="_blank">Visit Example</a>
            

Exercise:


HTML Attributes

Syntax:


            <img src="image.jpg" alt="Description of image">
            <a href="https://www.example.com" class="link">Example Link</a>
            

Exercise:


HTML Images

Syntax:


            <img src="image.jpg" alt="Description of the image" width="300" height="200">
            

Exercise:


HTML Self-Closing Elements

Syntax:


            <img src="logo.png" alt="Logo">
            <br>
            <hr>
            

Exercise:


HTML Video

Syntax:


            <video src="video.mp4" controls width="640" height="360">
              Your browser does not support the video tag.
            </video>
            

Exercise:


HTML Audio

Syntax:


            <audio src="audio.mp3" controls>
              Your browser does not support the audio tag.
            </audio>
            

Exercise:


HTML Buttons

Syntax:


            <button type="button">Click Me</button>
            <button type="submit">Submit</button>
            <button type="reset">Reset</button>
            

Exercise:


HTML Forms: Text Fields

Syntax:


            <form>
              <label for="username">Username:</label>
              <input type="text" id="username" name="username" placeholder="Enter your username">
            </form>
            

Exercise:


HTML Forms: Text Area

Syntax:


            <form>
              <label for="message">Message:</label>
              <textarea id="message" name="message" rows="4" cols="50" placeholder="Enter your message"></textarea>
            </form>
            

Exercise:


HTML Forms: Radio Buttons

Syntax:


            <form>
              <label><input type="radio" name="gender" value="male"> Male</label>
              <label><input type="radio" name="gender" value="female"> Female</label>
            </form>
            

Exercise:


HTML Forms: Check Boxes

Syntax:


            <form>
              <label><input type="checkbox" name="hobby" value="reading"> Reading</label>
              <label><input type="checkbox" name="hobby" value="traveling"> Traveling</label>
            </form>
            

Exercise:


HTML Forms: Drop Downs

Syntax:


            <form>
              <label for="car">Choose a car:</label>
              <select id="car" name="car">
                <option value="volvo">Volvo</option>
                <option value="saab">Saab</option>
                <option value="fiat">Fiat</option>
                <option value="audi">Audi</option>
              </select>
            </form>
            

Exercise:


HTML Favicon

Syntax:


            <head>
              <link rel="icon" href="favicon.ico" type="image/x-icon">
            </head>
            

Exercise:


HTML Symbols

Syntax:


            <p>&copy; 2024 Your Company</p>
            <p>&amp; More Symbols</p>
            

Exercise:


HTML Emojis

Syntax:


            <p>Have a great day! 😊</p>
            

Exercise:


HTML Semantics

Syntax:


            <header>
              <h1>Page Title</h1>
            </header>
            <main>
              <section>
                <h2>Section Title</h2>
                <p>Section content goes here.</p>
              </section>
            </main>
            <footer>
              <p>Footer content.</p>
            </footer>
            

Exercise:


HTML iFrame/Youtube

Syntax:


            <iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ" width="560" height="315" frameborder="0" allowfullscreen></iframe>
            

Exercise: