What Is HTML?

 

🧱 What Is HTML?

 HTML is the standard markup language used to structure and display content on the web. It organizes text, images, links, and other media using tags and elements that browsers can interpret.


📝 Basic Structure of an HTML Document

Here's a simple example of an HTML document:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

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

    <title>My First Website</title>

</head>

<body>

    <h1>Welcome to My Website</h1>

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

</body>

</html>

Explanation:

  • <!DOCTYPE html>: Declares the document type and version of HTML.

  • <html>: The root element that wraps all content.

  • <head>: Contains metadata like the character set and title.

  • <body>: Contains the visible content of the page.

🔧 Common HTML Tags

  • Headings: <h1> to <h6> — Define headings, with <h1> being the most important.

  • Paragraphs: <p> — Defines a paragraph of text.

  • Links: <a href="URL">Link Text</a> — Creates hyperlinks.

  • Images: <img src="image.jpg" alt="Description"> — Embeds images.

  • Lists:

    • Unordered: <ul><li>Item</li></ul>

    • Ordered: <ol><li>Item</li></ol>

  • Forms: <form>, <input>, <textarea>, <button> — Collect user input.

🧱 Basic HTML Tags

1. <html>

  • Purpose: Defines the root of an HTML document.

  • Example:

    html
    <html lang="en"> <!-- Document content goes here --> </html>

2. <head>

  • Purpose: Contains metadata, links to stylesheets, and other resources.

  • Example:

    html
    <head> <meta charset="UTF-8"> <title>Page Title</title> </head>

3. <body>

  • Purpose: Holds the content visible to users, such as text, images, and links.

  • Example:

    html
    <body> <h1>Welcome to My Website</h1> <p>This is a paragraph.</p> </body>

4. <h1> to <h6>

  • Purpose: Define headings, with <h1> being the most important and <h6> the least.

  • Example:

    html
    <h1>Main Heading</h1> <h2>Subheading</h2>

5. <p>

  • Purpose: Defines a paragraph of text.

  • Example:

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

6. <a>

  • Purpose: Creates hyperlinks.

  • Example:

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

7. <img>

  • Purpose: Embeds images.

  • Example:

    html
    <img src="image.jpg" alt="Description of image">

8. <ul> and <ol>

  • Purpose: Define unordered (bulleted) and ordered (numbered) lists, respectively.

  • Example:

    html

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

9. <li>

  • Purpose: Defines a list item within <ul>, <ol>, or <menu>.

  • Example:

    html
    <ul> <li>List item</li> </ul>

10. <br>

  • Purpose: Inserts a line break within text.

  • Example:

    html
    Line one<br>Line two

 "This Content Sponsored by Buymote Shopping app

BuyMote E-Shopping Application is One of the Online Shopping App

Now Available on Play Store & App Store (Buymote E-Shopping)

Click Below Link and Install Application: https://buymote.shop/links/0f5993744a9213079a6b53e8

Sponsor Content: #buymote #buymoteeshopping #buymoteonline #buymoteshopping #buymoteapplication"

Comments