Learning coding means GreatToCode Be more than a Coder ! Greattocode , Join GreatToCode Community,1000+ Students Trusted On Us .If You want to learn coding, Then GreatToCode Help You.No matter what It Takes !


CODE YOUR WAY TO A MORE FULFILLING And HIGHER PAYING CAREER IN TECH, START CODING FOR FREE Camp With GreatToCode - Join the Thousands learning to code with GreatToCode
Interactive online coding classes for at-home learning with GreatToCode . Try ₹Free Per Month Coding Classes With The Top Teachers . Html Examples Guide

Html Examples Guide

Become More Then A coder | Learn & Start Coding Now. HTML Examples Guide

HTML Examples Guide

Basic HTML Structure

This is a basic HTML page structure:

<!DOCTYPE html>

<html lang="en">

    <head>

        <meta charset="UTF-8">

        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <title>Basic HTML Page</title>

    </head>

    <body>

        <h1>Hello, World!</h1>

        <p>This is a basic HTML page.</p>

    </body>

</html>

Example:

Hello, World!

This is a basic HTML page.

HTML Forms

Forms are used to collect user input. Here's an example of a simple form:

<form action="/submit" method="post">

    <label for="name">Name:</label>

    <input type="text" id="name" name="name" required>

    <label for="email">Email:</label>

    <input type="email" id="email" name="email" required>

    <input type="submit" value="Submit">

</form>

Example:

HTML Links

Links are used to navigate between pages. Here's an example of a hyperlink:

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

Example:

HTML Lists

HTML supports ordered and unordered lists:

<ul>

    <li>Item 1</li>

    <li>Item 2</li>

    <li>Item 3</li>

</ul>

<ol>

    <li>First</li>

    <li>Second</li>

    <li>Third</li>

</ol>

Examples:

  • Item 1
  • Item 2
  • Item 3
  1. First
  2. Second
  3. Third

HTML Tables

Tables are used to display tabular data. Here's an example of a simple table:

<table border="1">

    <tr>

        <th>Header 1</th>

        <th>Header 2</th>

    </tr>

    <tr>

        <td>Data 1</td>

        <td>Data 2</td>

    </tr>

</table>

Example:

Header 1 Header 2
Data 1 Data 2

HTML Media

HTML supports embedding media such as videos and audio:

<video width="320" height="240" controls>

    <source src="movie.mp4" type="video/mp4">

    <source src="movie.ogg" type="video/ogg">

    Your browser does not support the video tag.

</video>

<audio controls>

    <source src="audio.mp3" type="audio/mpeg">

    <source src="audio.ogg" type="audio/ogg">

    Your browser does not support the audio element.

</audio>

Examples:

HTML Forms with Validation

Forms can include various types of input fields and validation attributes:

<form action="/submit" method="post">

    <label for="username">Username:</label>

    <input type="text" id="username" name="username" minlength="4" required>

    <label for="password">Password:</label>

    <input type="password" id="password" name="password" required>

    <input type="submit" value="Submit">

</form>

Example:

© 2024 GreatToCode. All rights reserved.

Post a Comment

0 Comments

•Give The opportunity to your child with GreatToCode Kid's • Online Coding Classes for Your Kid • Introduce Your kid To the world's of coding
•Fuel You Career with our 100+ Hiring Partners, Advance Your Career in Tech with GreatToCode. •Join The Largest Tech and coding Community and Fast Forward Your career with GreatToCode. •10000+ Learner's+ 90 % placement Guarantee. • Learning Coding is Better with the GreatToCode community .
•Greattocode Kid's •GreatToCode Career •GreatToCode Interview •GreatToCode Professional •GreatToCode for schools •GreatToCode For colleges •GreatToCods For Businesses.
Are you ready to join the millions of people learning to code? GreatToCode Pass is your one-stop-shop to get access to 1000+ courses, top-notch support, and successful job placement. What are you waiting for? Sign up now and get your future in motion with GreatToCode Pass.