What is HTML ?

What is HTML ?

HTML: hypertext markup language

HTML language is the basic building block of the web.

“Hypertext markup language” is the standard markup language used to create web pages.

For creating webpages HTML is the most basic standard language.

It defines the structure of the web pages.

In HTML “Hypertext” refers to the links that connect web pages to one other within a single website or between different websites.

Hyperlinks\links are the fundamental aspect of the web.

HTML is a combination of “hypertext and markup language”

HTML uses “markup” to annotate images, text, and other content for display in a web browser.

HTML contains a series of elements that enclose different parts of content to make it appear or act in a certain way.

HTML document:

In “HTML document” a set of elements are available that are known as “tags or elements”.

These “Elements or tags” are surrounded by the (< >) angle tags.

Inside the elements, the name of the elements or tags is case-sensitive element names can be returned in upper, lower, and mixture cases.

<TABLE> uppercase
<TabLE>mixture
<table> lowercase

The conventional or recommended practice prefers to write text in lowercase.

HTML tags

HTML tags are like keywords that help to define How a web browser will display and format the content.

HTML tags contain three major parts: opening tags, closing tags, and content.

Syntax- <tag>content</tag>

HTML attributes

HTML tags have attributes that provide additional information about the element.

Every tag and element has attributes that help to define the behaviour.

Attributes are always applied with the start tag.

Attributes always be applied with their names and values.

These are case-sensitive they should written in lowercase.

We add multiple attributes in the HTML element but we need to give spaces in every attribute.

Syntax - <tag attribute_name= ”value”> content</tag>

Anatomy of HTML tags

An element is a collection of opening tags, closing tags, and attributes with content between them.

Syntax - <p> This is a paragraph </p>

<p> - opening tag

This is a paragraph - Content

</p> - closing tag

All HTML tags always have must to enclosed with Angle tags(< >).

Different HTML tags are used for different work.

Types of elements

Nesting Element:

Elements contain other elements known as nesting elements.

Eg. <body> <p> hello this is word </p> </body>

Void Elements:

Some elements don’t have content these elements are known as void elements.

These elements don’t have opening tags and closing tags.

Eg. <img src=”users://new folders/any_pictures.png” alt=” an image” img/>

This tag contains two attributes but doesn’t have a closing tag.

Its purpose is to embed the image in the HTML page.

Block line Elements and Inline Elements: For styling and display purposes in HTML all the Elements have been divided into two types

Block line Level Elements:

A block line level element always starts from the new line and covers the web pages from left to right. It occupies the entire whole horizontal line.

elements can contain block line elements and inline elements.

Inline Elements:

Inline Elements don’t start from the new line.

It takes width as per requirements.

Inline Elements are mostly used with other elements.

Page structure of HTML:-

HMTL Basic tags

<!Doctype html>: Doctype is meant to act as a link to a set of considered good HTML documents.

Now <! Doctype html> is the shortest string of characters that count as a valid doctype.

<html></html>: This element is known as root elements as a root element. This contains all the content on the page.

<head></head>: The <head> element is a container for metadata (data about data). This element of content doesn’t show viewers.

These include keywords and a page description that would appear in search results, CSS to style content character set declaration, and more.

The following elements go inside the <head> element:

<title>

<style>

<meta>

<script>

<nonscript>

<title></tiltle>: This set of tags, the title that appears in the browser tab page is loaded in.

This title is also used to describe when it is bookmarked.

<body></body>: This contains all the content that is displayed on the web page including text, images, video, playable audio tracks, and many other things.