Introduction of HTML

What is HTML?

  • HTML stands for Hyper Text Markup Language,which is used for creating Webpages , it's describes the structure of a Web page.

  • HTML consists of a series of elements and elements tell the browser how to display the content.

  • Each HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.

  • Features of HTML

    • It is easy to learn and easy to use and It is platform-independent.

    • Images, videos, and audio can be added to a web page.

    • Hypertext can be added to the text.

A Simple Html Document:-

Example

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

Example Explained:-

  • The <!DOCTYPE html> declaration defines that this document is an HTML5 document

  • The <html> element is the root element of an HTML page

  • The <head> element contains meta information about the HTML page

  • The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)

  • The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

  • The <h1> element defines a large heading

  • The <p> element defines a paragraph

HTML Formatting Tags:-

Formatting elements were designed to display special types of text:

  • <b> - Bold text

  • <strong> - Important text

  • <i> - Italic text

  • <em> - Emphasized text

  • <mark> - Marked text

  • <small> - Smaller text

  • <del> - Deleted text

  • <ins> - Inserted text

  • <sub> - Subscript text

  • <sup> - Superscript text

HTML <b> and <strong> Elements

1.The HTML <b> element defines bold text, without any extra importance.

2.The HTML <strong> element defines text with strong importance. The content inside is typically displayed in bold.

HTML <i> and <em> Elements

1.The HTML <i> element defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.

2.The HTML <em> element defines emphasized text. The content inside is typically displayed in italic.

HTML <small> Element

1.The HTML <small> element defines smaller text.

HTML <del> Element

1.The HTML <del> element defines text that has been deleted from a document. Browsers will usually strike a line through deleted text:

HTML <ins> Element

1.The HTML <ins> element defines a text that has been inserted into a document. Browsers will usually underline inserted text:

HTML <sub> Element

1.The HTML <sub> element defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O:

HTML <sup> Element

1.The HTML <sup> element defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes, like WWW[1]:

HTML Text Formatting Elements:-

TagDescription
<b>Defines bold text
<em>Defines emphasized text
<i>Defines a part of text in an alternate voice or mood
<small>Defines smaller text
<strong>Defines important text
<sub>Defines subscripted text
<sup>Defines superscripted text
<ins>Defines inserted text
<del>Defines deleted text
<mark>Defines marked/highlighted text
0
Subscribe to my newsletter

Read articles from Santhamma Kuppireddy directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Santhamma Kuppireddy
Santhamma Kuppireddy