Html

            What is HTML? 


HTML stands for HyperText Markup Language. It is the standard language used to create and design webpages. HTML is used to structure content on the web such as text, images, videos, links, tables, forms, and more.


---


🔑 Key Features of HTML


Feature Description


Markup Language Uses tags (<tagname>) to define elements

Platform Independent Works on all devices and browsers

Text-based Written in plain text and saved with .html or .htm extension

Supported by Browsers Interpreted by web browsers to render the content

Static Language Does not support dynamic behavior (uses CSS/JS for interactivity)


---


🧱 Basic Structure of an HTML Document


    <!DOCTYPE html>

     <html>

      <head>

         <title>My First Web Page</title>

     </head>

     <body>

         <h1>Welcome to HTML</h1>

         <p>This is a paragraph of text.</p>

     </body>

   </html>


 Explanation:


<!DOCTYPE html>: Declares the document as HTML5


<html>: Root element of the HTML document

<head>: Contains metadata (title, links, scripts)

<title>: Sets the title of the page (shown in the browser tab)


 <body>: Contains all the visible content (headings, paragraphs, etc.)


---


📄 Common HTML Elements with Examples


1. Headings


<h1>Main Heading</h1>

<h2>Subheading</h2>


2. Paragraphs


<p>This is a paragraph.</p>


3. Links


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


4. Images


<img src="image.jpg" alt="A beautiful image" width="300">


5. Lists


Ordered List:


<ol>

  <li>First</li>

  <li>Second</li>

</ol>


Unordered List:


<ul>

  <li>Item A</li>

  <li>Item B</li>

</ul>


6. Tables


<table border="1">

  <tr>

    <th>Name</th>

    <th>Age</th>

  </tr>

  <tr>

    <td>Alice</td>

    <td>25</td>

  </tr>

</table>


7. Forms


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

  <label>Name:</label>

  <input type="text" name="username">

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

</form>


Comments