What is HTML

 What is HTML?

Hyper Text Markup Language is a full form of HTML. HTML is the standard markup language for Web pages. HTML elements are the building blocks of HTML pages. These elements are represented by <> tags are used in HTML. It allows the user to create and structure sections, paragraphs, headings, links, and blockquotes for web pages and applications.

HTML Elements

An HTML element is a start tag and an end tag


Start tagElement contentEnd tag
<title>This is a title</title>
<h1>This is heading</h1>

A Sample of HTML Document Structure

See Below sample of an HTML Format:


Try Your Self



HTML Attributes

  • HTML elements have attributes.
  • Attributes provide additional information on the element.
  • It comes in name/value pairs of Such as charset="utf-8".

Example of HTML with Explained

HTML elements are the building blocks of HTML pages.

  •  <!DOCTYPE html> is the declaration that defines this document to be HTML5.
  •  <html> is the element that is the root element of an HTML page.
  •  lang is an attribute that defines the language of the document.
  •  <meta> is the element that contains meta-information about the document.
  •  charset is an attribute that defines the character set used in the document.
  •  <title> is the element that specifies a title for the document.
  •  <body> is the element that contains the visible page content.
  •  <h1> is the element that defines a large heading.
  •  <p> is the element that defines a paragraph.

HTML Documents

  • All HTML documents must start with a document type declaration: <!DOCTYPE html>.
  • The HTML document itself begins with <html> and ends with </html>.
  • The visible part on the webpage we used in an HTML document is between <body> and </body>.


HTML Structure

See Below sample of an HTML Format in Screenshot:

What is HTML


Example of HTML Tags with Explain


HTML Heading Tags

  • HTML headings are defined with <h1> to <h6> tags.
  • Heading is define as <h1> to <h6>


Example

Try Your Self



HTML Paragraphs Tags

  • HTML paragraphs are defined with <p> tags.
  • paragraphs are start with <p> tags.
  • paragraphs are end with </p> tags.


Example


Try Your Self



HTML Links

  • HTML links are defined with <a> tags.
  • links are specified in the href 


Example



Try Your Self



HTML Images Tags

  • HTML images are defined with <img> tags.
  • Used for image tags, Source file (src), alternative text (alt), width, and height are provided as attributes

Example

Try Your Self



HTML Buttons

HTML buttons are defined as <button> tags.

Example


Try Your Self



HTML Lists Tags

HTML lists are defined as <ul> (unordered/bullet list) or <ol> (ordered/numbered list) tags, followed by <li> tags.

Example


Try Your Self



HTML Tables Tags

  • HTML table is defined as a <table> tag.
  • Table rows are defined as <tr> tags.
  • Table headers are defined as <th> tags. (bold and centered by default).
  • Table cells (data) are defined as <td> tags.

Example


Try Your Self



HTML Programming

  • Every HTML element has attributes.
  • For website development and programming, the most important attributes are id and class.

AttributeExample
id<table id="table01"
class<p class="normal">
style<p style="font-size:14px">
data-<div data-id="400">
onclick<input onclick="myFunction()">
onmouseover<a onmouseover="this.setAttribute('style','color:blue')">

Post a Comment

Post a Comment (0)

Previous Course Next Course