#web development
#html

What is HTML used for ?

Anonymous

AnonymousFeb 01, 2024

What is HTML used for ?

The structure and content of web pages on the World Wide Web are created using HTML, an acronym for HyperText Markup Language. Web browsers use it as a standard markup language to interpret and display forms, images, text, links, and other elements on a webpage.

HTML Versions

HTML (HyperText Markup Language) has gone through various versions since its inception. Here are some of the key versions:

1. HTML 1.0 (1991): This was the first version of HTML introduced by Tim Berners-Lee. It included basic tags for structuring documents but was limited in terms of functionality.

2. HTML 2.0 (1995): Developed by the Internet Engineering Task Force (IETF), HTML 2.0 included additional features like tables and text alignment.

3. HTML 3.2 (1997): This version added support for scripting languages (like JavaScript) and introduced new features such as applets, text flow around images, and tables with more advanced formatting.

4. HTML 4.01 (1999): It brought further refinements to HTML and introduced the concept of Document Object Model (DOM). HTML 4.01 included support for style sheets, scripting, and improved accessibility.

5. XHTML (Extensible HyperText Markup Language): XHTML was introduced as a reformulation of HTML as an XML application. It aimed to bring HTML into the world of XML, adhering to stricter syntax rules. XHTML 1.0 and 1.1 were developed in this context.

6. HTML5 (2014): HTML5 is the latest major version of HTML. It brought significant changes and introduced new elements, attributes, and APIs to enhance the capabilities of web pages. HTML5 also provided better support for multimedia elements like audio and video, as well as improved forms and input features.

7. 2016: W3C Candidate Recommendation: HTML 5.1

8. 2017: [W3C Recommendation: HTML5.1 2nd Edition](http://www.w3.org/TR/html51/)

9. 2017: [W3C Recommendation: HTML5.2](http://www.w3.org/TR/html52/)

A Simple HTML Document

Example


<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>My Webpage</title>
  <link rel="stylesheet" href="styles.css">
</head>

<body>
  <h1>Welcome to My Webpage</h1>
  <p>This is a sample HTML page.</p>
  <ul>
    <li><a href="#section1">Section 1</a></li>
    <li><a href="#section2">Section 2</a></li>
  </ul>
  <img src="example.jpg" alt="An example image">
</body>

</html>

Example Explained

  • The <!DOCTYPE html> declaration is placed at the very beginning of an HTML document to inform the web browser about the version of HTML being used. It helps the browser to interpret the page correctly.
  • The <html> tag wraps the entire HTML document and serves as the root element.
  • The <head> section contains meta-information about the HTML document, such as the title, character set, linked stylesheets, and scripts. Common elements within the <head> section include:
    <meta>: Defines metadata like character set, viewport settings, etc.
    <title>: Sets the title of the HTML document, displayed in the browser's title bar or tab.
    <link>: Links external resources like stylesheets (CSS) or icons.
    <style>: Contains internal CSS styles.
    <script>: Links or embeds JavaScript code
  • The <body> tag encloses the main content of the HTML document, including text, images, links, forms, and other elements. This is where the visible part of the webpage is defined.
  • Heading tags (<h1>, <h2>, <h3>, ..., <h6>) are used to define headings or subheadings within the document. They represent different levels of hierarchy, with <h1> being the highest level and <h6> the lowest.
  • The <p> tag is used to define paragraphs of text.
  • <ul>(unordered list) and <ol>(ordered list) are used to create lists, while <li>defines individual list items.
  • The <a> tag is used to create hyperlinks. It includes the href attribute, which specifies the URL the link points to.
  • The <img> tag is used to embed images. It includes the src attribute, specifying the image file's source.

Output:

Features of HTML

  • Platform independent.
  • Easy to learn and easy to use.
  • Images, videos, and audio can be added to a web page.
  • Hypertext can be added to the text.
  • Markup language.

Why learn HTML? 

  • It is a simple markup language. Its implementation is easy.
  • It is used to create a website.
  • Helps in developing fundamentals about web programming.

Advantages of HTML

  • HTML helps you create the structure of web pages.
  • It's supported by all web browsers, making your content accessible to everyone.
  • Learning HTML opens up opportunities in web development and design.
  • With HTML, you can arrange text, links, and images on your webpage.
  • It's a key part of making your website look good and do cool stuff with CSS and JavaScript.

Disadvantages of HTML

  • HTML alone can't make web pages very interactive; you need JavaScript for that.
  • It's not great for making things look pretty; for that, you need CSS
  • HTML doesn't have built-in security features; you have to manage security separately.
  • While HTML is easy to start with, mastering web development involves learning multiple languages.