What is HTML? Introduction of HTML.

What is HTML? Introduction of HTML.

html

HTML

{tocify} $title={Table of Contents}

What is HTML?

The full form of html is Hypertext Markup Language
HTML describe the structure of web pages.
HTML5 is the is the fifth and current major version of the HTML standard.

Why learn HTML?

It is essential to be told HTML if you wish to make websites. you cannot build one if you do not know HTML because it’s one among the prerequisites in learning other languages used for web development.

Example


<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>This is a header </h1>
<p>This is a paragraph</p>
<body>
<html>

Example Explained

  • <!DOCTYPE html>:this declares the document type which is HTML5
  • <html>:this element encloses everything within an html document, it includes tags, elements, style sheets, scripts, text, multimedia and lot more
  • <head>:this element encloses the metadata of a document which will not be displayed on the main content of a web page, this could include style sheet, scripts,<title>, <meta> tags and a lot more
  • <title>:this element defines  the title of web page, it appears on the upper-part of a browser
  • <body>:this element encloses elements like <h1>, <p>, <b>, <div> and lot more
  • <h1>:this element defines a heading
  • <p>:this element defines a paragraph 

HTML Tags

HTML Tags are element name surrounded by angle brackets.
In HTML we start and end tags. Look at the example.
    <p>Hello<p>
Starting Tag and End Tag
  • start tag-also called “opening a tag”. EX:<p>
  • End tag-also called “ending a tag”. EX</p>

HTML Headings Tag

  • Html heading usually contain a title or a main topic of a certain content.
  • It is a block-level elements.
  • The <h1>to<h6> tags are used to define HTML heading.
  • <h1> defines largest heading and <h6> defines smallest heading.

Example:

<!DOCTYPE html>
<html>
<head>
<title>PoorWebDev</title>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h1>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<body>
<html>

Output:

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

HTML Paragraphs:

  • HTML paragraphs are mainly use to group sentences.
  • The <P> tag define a paragraph of text.
Attribute Value Description
align center,left,right,justify paragraph text alignment

Example:


<!DOCTYPE html>
<html>
<head>
<title>PoorWebDev</title>
</head>
<body>
<p>Html paragraphs</p>
<p>Html paragraphs</p>
<p>Html paragraphs</p>
<body>
<html>

Output:

Html paragraphs

Html paragraphs

Html paragraphs

HTML <hr> Tag:

  • The <hr> tag is used for creating a horizontal line. This is also called horizontal rule in HTML.

Example:


<!DOCTYPE html>
<html>
<head>
<title>PoorWebDev</title>
</head>
<body>
<p>HTML <hr> tag</p>
<hr>
<body>
<html>

Output:

HTML hr tag


HTML <img> tag:

  • The <img> tag defines an image in an html page.
Attribute Value Description
scr URL Specifies the URL to the image.
height pixels or % Specifies the height of the image.
width pixels or % Specifies the width of the image.
alt text Specifies an alternate image text.

Example:


<!DOCTYPE html>
<html>
<head>
<title>PoorWebDev</title>
</head>
<body>
<img src="image.jpg">
<body>
<html>

Tags: No tags

Add a Comment

Your email address will not be published. Required fields are marked *