Notification texts go here Contact Us Click here

Introduction to HTML

Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated

* History and Evolution of HTML 👇

1. Early Beginnings

  • 1989: Tim Berners-Lee, a physicist at CERN, proposed a system for sharing documents via the Internet. This proposal laid the groundwork for what would become the World Wide Web.
  • 1990: Tim Berners-Lee wrote the first version of HTML (HyperText Markup Language), along with the first web browser (WorldWideWeb) and the first web server (httpd).

2. HTML 1.0

  • 1993: HTML 1.0 was released, standardizing the initial set of 18 HTML tags. This version included basic tags for headings, paragraphs, lists, links, and images.
    • No formal specification, but it established the foundation of HTML's structure.

3. HTML 2.0

  • 1995: HTML 2.0 was developed by the Internet Engineering Task Force (IETF) as an official standard. It included all features of HTML 1.0 and added new elements and attributes, making HTML more robust.
    • Introduced forms (<form>), more complex tables, and more attributes for controlling document structure.

4. HTML 3.2

  • 1997: HTML 3.2 was standardized by the World Wide Web Consortium (W3C). This version aimed to standardize the more advanced and popular features being used in web browsers.
    • Added support for tables (<table>), applets (<applet>), and scripting languages like JavaScript.

5. HTML 4.0 and 4.01

  • 1997: HTML 4.0 was released, marking a significant improvement over previous versions. It focused on separating content from presentation and introduced:
    • Cascading Style Sheets (CSS) support.
    • Better internationalization features.
    • Support for scripting, embedded objects, and richer form controls.
  • 1999: HTML 4.01 was a minor update that corrected errors and improved the specification.

6. XHTML 1.0

  • 2000: XHTML 1.0 was introduced as a reformulation of HTML 4.01 in XML (Extensible Markup Language). It aimed to make HTML more rigorous and better suited for use with other XML-based standards.
    • XHTML required stricter syntax and was more case-sensitive.

7. HTML5

  • 2014: HTML5 was officially recommended by W3C, representing a significant leap forward in web technology. It was designed to be backward compatible and introduced a wide range of new features and improvements:
    • New semantic elements like <header>, <footer>, <article>, <section>, and <nav>.
    • Improved support for multimedia with the <audio> and <video> elements.
    • APIs for local storage, geolocation, and offline web applications.
    • Enhanced form controls with new input types and attributes.
    • Canvas element for drawing graphics.

8. HTML5.1 and Beyond

  • 2016: HTML5.1 was published by W3C, refining the HTML5 specification and adding new features based on user and developer feedback.
    • Improvements included new elements, attributes, and APIs for better web application performance.
  • 2017-Present: HTML Living Standard maintained by WHATWG (Web Hypertext Application Technology Working Group) continues to evolve, with continuous updates reflecting current web development practices and emerging technologies.

* Concepts in HTML Evolution

  • Separation of Concerns: Modern HTML emphasizes separating content (HTML), presentation (CSS), and behavior (JavaScript) for cleaner, more maintainable code.
  • Backward Compatibility: New versions of HTML are designed to work with existing content, ensuring that older web pages remain functional.
  • Semantics: HTML5 introduced many new semantic elements to improve the clarity and accessibility of web content.
  • Interactivity: HTML5 and beyond have focused on increasing the interactivity of web pages with native support for multimedia and APIs.

The basic structure of an HTML document consists of a set of nested elements that define the layout and content of a web page. Here's a breakdown of the essential components and their purposes:

*Basic HTML Document Structure

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Page Title</title>
  6. </head>
  7. <body>
  8. <!-- Page content goes here -->
  9. </body>
  10. </html>

* Detailed Explanation

  1. Document Type Declaration (<!DOCTYPE html>)

    • This declaration defines the document type and version of HTML being used. The <!DOCTYPE html> declaration is used for HTML5 and helps browsers to render the page correctly.
  2. HTML Root Element (<html>)

    • The <html> element is the root of an HTML document. All other elements must be descendants of this element.
    • The <html> tag typically includes the lang attribute to specify the language of the document, e.g., <html lang="en"> for English.
  3. Head Section (<head>)

    • The <head> element contains meta-information about the HTML document, such as the document's title, character set, linked stylesheets, and scripts.
    • Key elements inside the <head> section:
      • <meta charset="UTF-8">: Specifies the character encoding for the document, ensuring that characters are displayed correctly.
      • <title>: Sets the title of the web page, which appears in the browser tab.
      • Other elements: <meta> (for metadata), <link> (for linking external resources like CSS files), <style> (for internal CSS), and <script> (for JavaScript).
  4. Body Section (<body>)

    • The <body> element contains all the content that is displayed on the web page, such as text, images, videos, links, forms, and other elements.
    • Anything within the <body> tags is rendered by the browser when the page is loaded.

Example of a Basic HTML Document

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>My First HTML Page</title>
  7. </head>
  8. <body>
  9. <h1>Welcome to My Tech Coding</h1>
  10. <p>This is a paragraph of text on my first web page.</p>
  11. <a href="https://visualstudiocode8858.blogspot.com/">Visit first Example.com</a>
  12. </body>
  13. </html>

* Explanation of the Example

  1. <!DOCTYPE html>: Declares the document as an HTML5 document.
  2. <html lang="en">: Starts the HTML document and sets the language to English.
  3. <head>: Contains meta-information about the document.
    • <meta charset="UTF-8">: Specifies the character encoding.
    • <meta name="viewport" content="width=device-width, initial-scale=1.0">: Ensures proper scaling on mobile devices.
    • <title>My First HTML Page</title>: Sets the page title.
  4. <body>: Contains the visible content of the page.
    • <h1>Welcome to My Website</h1>: A heading element.
    • <p>This is a paragraph of text on my first web page.</p>: A paragraph element.
    • <a href="https://www.example.com">Visit Example.com</a>: A hyperlink to another website.

This structure is the foundation of any HTML document. As you become more familiar with HTML, you'll learn to include additional elements and attributes to enhance your web pages.

* HTML Tags, Elements, and Attributes

Understanding HTML tags, elements, and attributes is fundamental to creating and manipulating web pages. Here's a detailed explanation of each concept:

1. HTML Tags

  • Definition: Tags are the basic building blocks of HTML, used to create elements. Tags are enclosed in angle brackets (< >).
  • Types of Tags:
    • Opening Tags: These start an element, e.g., <p> for a paragraph.
    • Closing Tags: These end an element and are prefixed with a forward slash, e.g., </p>.
    • Self-Closing Tags: These are used for elements that don't have content, e.g., <img /> or <br />.
  • HTML tags are the building blocks of an HTML document. Tags are used to create elements, which define the structure and content of the web page.

    Syntax:

    <tagname>Content</tagname>

    Example:

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

    In this example, <p> is the opening tag and </p> is the closing tag.

    2. HTML Elements

    HTML elements consist of a start tag, content, and an end tag. Some elements are empty and don't have any content or an end tag (self-closing).

    Syntax:

    <tagname>Content</tagname>

    or for self-closing elements:

    <tagname />

    Example:

    <p>This is a paragraph.</p> <img src="image.jpg" alt="Description">
    • The first element is a paragraph element with text content.
    • The second element is an image element which is self-closing.

    3. HTML Attributes

    Attributes provide additional information about HTML elements. They are included within the opening tag and consist of a name and a value.

    Syntax:

    <tagname attribute="value">Content</tagname>

    Example:

    <a href="https://www.example.com" target="_blank">Visit Example.com</a> <img src="image.jpg" alt="Description" width="500" height="600">
    • The <a> tag has two attributes: href (which specifies the URL) and target (which specifies where to open the linked document).
    • Common Attributes:
      • id: Unique identifier for an element.
      • class: Class name(s) for CSS styling or JavaScript manipulation.
      • style: Inline CSS styles.
      • title: Text to display as a tooltip.
      • src: Source file for media elements like images, videos, and audio.
      • href: Hyperlink reference for anchor tags.
    • The <img> tag has several attributes: src (which specifies the path to the image), alt (which provides alternative text), and width and height (which specify the dimensions of the image).

    Common HTML Tags and Their Attributes 😍

    Text Formatting Tags

    • <p>: Paragraph
    • <h1> to <h6>: Headings
    • <b>: Bold text
    • <i>: Italic text
    • <u>: Underlined text
    • <br>: Line break (self-closing)
    • <hr>: Horizontal rule (self-closing)

    Links and Media Tags

    • <a>: Anchor (link)
      • Attributes: href, target, title
    • <img>: Image (self-closing)
      • Attributes: src, alt, width, height
    • <audio>: Audio
      • Attributes: src, controls
    • <video>: Video
      • Attributes: src, controls, width, height

    List Tags

    • <ul>: Unordered list
    • <ol>: Ordered list
    • <li>: List item
    • <dl>: Definition list
    • <dt>: Definition term
    • <dd>: Definition description

    Table Tags

    • <table>: Table
    • <tr>: Table row
    • <th>: Table header
    • <td>: Table data cell
    • Attributes: border, cellpadding, cellspacing

    Form Tags

    • <form>: Form
      • Attributes: action, method
    • <input>: Input field (self-closing)
      • Attributes: type, name, value, placeholder
    • <textarea>: Multiline text input
      • Attributes: name, rows, cols
    • <button>: Button
      • Attributes: type
    • <label>: Label for form element
      • Attributes: for

    Example of Using Tags, Elements, and Attributes  ✌

    1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    6. <title>Sample Web Page</title>
    7. <style>
    8. body {
    9. font-family: Arial, sans-serif;
    10. }
    11. header, footer {
    12. background-color: #f8f9fa;
    13. padding: 10px;
    14. text-align: center;
    15. }
    16. nav {
    17. margin: 10px 0;
    18. }
    19. nav a {
    20. margin: 0 10px;
    21. text-decoration: none;
    22. color: #007bff;
    23. }
    24. table {
    25. width: 100%;
    26. border-collapse: collapse;
    27. }
    28. table, th, td {
    29. border: 1px solid #ddd;
    30. }
    31. th, td {
    32. padding: 8px;
    33. text-align: left;
    34. }
    35. th {
    36. background-color: #f2f2f2;
    37. }
    38. </style>
    39. </head>
    40. <body>
    41. <header>
    42. <h1>Welcome to My Tech Coding</h1>
    43. <nav>
    44. <a href="#about">About</a>
    45. <a href="#services">Services</a>
    46. <a href="#contact">Contact</a>
    47. </nav>
    48. </header>
    49. <section id="about">
    50. <h2>About Us</h2>
    51. <p>This is a sample web page created to demonstrate the use of various HTML tags, elements, and attributes.</p>
    52. <img src="https://arynews.tv/wp-content/uploads/2023/06/natural-resource.jpg" alt="Placeholder Image" width="600" height="200">
    53. </section>
    54. <section id="services">
    55. <h2>Our Services</h2>
    56. <ul>
    57. <li>Web Design</li>
    58. <li>Web Development</li>
    59. <li>SEO Optimization</li>
    60. </ul>
    61. </section>
    62. <section id="portfolio">
    63. <h2>Portfolio</h2>
    64. <ol>
    65. <li>Project 1</li>
    66. <li>Project 2</li>
    67. <li>Project 3</li>
    68. </ol>
    69. </section>
    70. <section id="contact">
    71. <h2>Contact Us</h2>
    72. <form action="/submit" method="post">
    73. <label for="name">Name:</label>
    74. <input type="text" id="name" name="name" placeholder="Enter your name"><br><br>
    75. <label for="email">Email:</label>
    76. <input type="email" id="email" name="email" placeholder="Enter your email"><br><br>
    77. <label for="message">Message:</label><br>
    78. <textarea id="message" name="message" rows="4" cols="50" placeholder="Enter your message"></textarea><br><br>
    79. <button type="submit">Submit</button>
    80. </form>
    81. </section>
    82. <section id="data">
    83. <h2>Data Table</h2>
    84. <table>
    85. <tr>
    86. <th>Name</th>
    87. <th>Age</th>
    88. <th>Occupation</th>
    89. </tr>
    90. <tr>
    91. <td>Friday</td>
    92. <td>30</td>
    93. <td>Web Developer</td>
    94. </tr>
    95. <tr>
    96. <td>Jarvis</td>
    97. <td>25</td>
    98. <td>Graphic Designer</td>
    99. </tr>
    100. </table>
    101. </section>
    102. <footer>
    103. <p>&copy; 2024 My Sample Web Page</p>
    104. </footer>
    105. </body>
    106. </html>


    * OUTPUT

    Welcome to My Tech Coding

    About Us

    This is a sample web page created to demonstrate the use of various HTML tags, elements, and attributes.

    Placeholder Image

    Our Services

    • Web Design
    • Web Development
    • SEO Optimization

    Portfolio

    1. Project 1
    2. Project 2
    3. Project 3

    Contact Us 

     

     




    Data Table

    NameAgeOccupation
    Friday30Web Developer
    Jarvis25Graphic Designer

    © 2024 My Sample Web Page


    View for More ...

    Post a Comment

    Cookie Consent
    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
    Oops!
    It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
    AdBlock Detected!
    We have detected that you are using adblocking plugin in your browser.
    The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.