What is HTML – Hyper text Markup Language

HTML (Hypertext Markup Language) is a markup language that is used to create web pages. It is one of the foundational technologies of the World Wide Web, along with CSS (Cascading Style Sheets) and JavaScript. HTML provides the basic structure and content of a web page, and is responsible for defining the elements that make up a page, such as headings, paragraphs, images, and links.

The History of HTML:

The history of HTML dates back to the early days of the World Wide Web. The first version of HTML, HTML 1.0, was released in 1991. It was a simple markup language that provided basic formatting for web pages. HTML 2.0 was released in 1995, and introduced several new features such as tables and image maps.

HTML 3.2 was released in 1997 and included support for style sheets and scripting. HTML 4.0 was released in 1997, and introduced new features such as frames and cascading style sheets. HTML 4.01, released in 1999, was a minor revision to HTML 4.0, and fixed some of the issues with the previous version.

In 2000, the World Wide Web Consortium (W3C) began work on a new version of HTML, called XHTML (Extensible Hypertext Markup Language). XHTML was designed to be a more strict version of HTML, and was based on XML (Extensible Markup Language). XHTML 1.0 was released in 2000, and was followed by XHTML 1.1 in 2001.

In 2004, the W3C began work on a new version of HTML, called HTML5. HTML5 was designed to be a more modern version of HTML, and included new features such as video and audio support, new semantic elements, and improved accessibility. HTML5 was officially released in 2014.

Basic Structure of an HTML Document:

An HTML document is made up of several different components. These include the document type declaration, the head section, and the body section.

The document type declaration tells the web browser what type of document it is dealing with. The most common document type declaration is the HTML5 document type declaration, which looks like this:<!DOCTYPE html>

The head section of an HTML document contains information about the document, such as the title of the page, links to external style sheets, and links to JavaScript files. The head section is not visible on the page, but is used by web browsers to render the page correctly.

The body section of an HTML document contains the content of the page, such as text, images, and links. This is the part of the document that is visible to users.

HTML Tags:

HTML uses tags to define the structure of a web page. Tags are surrounded by angle brackets, and most tags come in pairs, with a start tag and an end tag. The start tag is the tag that starts the element, and the end tag is the tag that ends the element. For example, the following code creates a paragraph element:<p>This is a paragraph.</p>

The “p” tag is the start tag, and the “/p” tag is the end tag. The text “This is a paragraph.” is the content of the paragraph.

Some HTML tags do not require an end tag. These are called self-closing tags, and are used for elements that do not have any content. For example, the following code creates an image element:<img src=”image.jpg” alt=”An image”>

The “img” tag is a self-closing tag, and does not require an end tag.

HTML Attributes:

HTML tags can also include attributes, which provide additional information about the element. Attributes are added to the start tag of an element using the following syntax:<tagname attribute1=”value1″ attribute2=”value2″>

For example, the following code creates a link element with an href attribute:

<a href=”https://www.example.com”>This is a link</a>

The “a” tag is the link tag, and the href attribute specifies the URL that the link points to.

HTML Elements:

HTML elements are the building blocks of a web page. An element is made up of a start tag, an end tag (in most cases), and the content of the element. HTML elements can be nested inside each other, which allows for complex page layouts.

HTML elements can be divided into two categories: block-level elements and inline elements. Block-level elements take up the entire width of their container, and create a new line after the element. Examples of block-level elements include headings, paragraphs, and divs. Inline elements, on the other hand, only take up as much width as their content, and do not create a new line. Examples of inline elements include links, images, and spans.

HTML5 introduced several new semantic elements, which provide additional meaning and context to the content of a web page. Examples of semantic elements include header, footer, nav, article, and section.

CSS and HTML:

CSS (Cascading Style Sheets) is a style sheet language that is used to add styles and layout to web pages. CSS and HTML are closely related, and are often used together to create visually appealing and well-organized web pages.

CSS works by selecting HTML elements and applying styles to them. CSS styles can be applied to individual elements, or to groups of elements. CSS styles can also be applied based on the state of an element, such as when it is hovered over or clicked.

JavaScript and HTML:

JavaScript is a programming language that is used to add interactivity and dynamic behavior to web pages. JavaScript and HTML are often used together to create interactive and dynamic web pages.

JavaScript can be used to manipulate HTML elements, such as changing the content of an element, or adding or removing elements from the page. JavaScript can also be used to respond to user events, such as clicks or keyboard input.

Conclusion:

HTML is a foundational technology of the World Wide Web, and is used to create the basic structure and content of web pages. HTML documents are made up of several components, including the document type declaration, the head section, and the body section. HTML uses tags to define the structure of a web page, and attributes to provide additional information about elements. HTML elements can be divided into block-level and inline elements, and HTML5 introduced several new semantic elements. CSS and JavaScript are often used together with HTML to create visually appealing and interactive web pages.

Share article :

YOU MIGHT ALSO LIKE