You are on page 1of 10

A.

1 ) Introduction to HTML
a. HTML Attributes
b. Empty and container tags

HTML
Hypertext Markup Language (HTML) is the
standard markup language for documents designed to be
displayed in a web browser. It can be assisted by
technologies such as Cascading Style Sheets (CSS)
and scripting languages such as JavaScript.

a. HTML Attributes
Attributes define additional characteristics or properties
of the element such as width and height of an image.
Attributes are always specified in the start tag (or
opening tag) and usually consists of name/value pairs
like name="value". Attribute values should always be
enclosed in quotation marks.

b. Empty and Container tag


Empty Tag –

An "empty tag" refers to HTML coding where the line


of code stands alone and is not closed with slash
characters. Empty tags are used to insert images,
lists, breaks, metatags, horizontal rules and
hyperlinks. Empty tags are bracketed by "<" and ">"
characters.

Elements with no closing tag are known as an empty


tag.
For example : <br>, <link>, <img>, <hr>, <meta>,
<source> etc. Since we can not specify anything in
between those. 

HTML element which does not have a closing tag are


called Empty elements.

Container Tag –

A container tag in HTML is one which has both


opening and closing tags. There are some tags in
HTML which don't have a closing tag. They end within
the same tag. 
Examples:
<html> is a container tag, it has it's closing tag as
</html>. Other examples are <body>, <head>, <p>
etc.
These are called container tags because they contain
something, within the two tags.

A.2) Document Tags


Document Tagging is the general process of adding extra
information to documents. It includes static additions to the
documents (for example, adding information
from Education into the document) or more dynamic
information (for example, marking a document for further
analysis or workflow).
You can use document tagging to:
 store the result of indexing steps (Categorize
Documents, Education, Sentiment Analysis) for later
retrieval.
 build interactive applications on top of data stored in
IDOL.

A.3) Title Tag


A title tag is an HTML element that specifies the title of a
web page.
Title tags are displayed on search engine results pages
(SERPs) as the clickable headline for a given result, and
are important for usability, SEO, and social sharing.
The title tag of a web page is meant to be an accurate
and concise description of a page's content.

A.4) Formatting Tag


HTML Formatting is a process of formatting text
for better look and feel. HTML provides us ability to
format text without using CSS. There are many
formatting tags in HTML. These tags are used to
make text bold, italicized, or underlined. There are
almost 14 options available that how text appears
in HTML and XHTML.
In HTML the formatting tags are divided into two
categories:
o Physical tag: These tags are used to provide
the visual appearance to the text.
o Logical tag: These tags are used to add some
logical or semantic value to the text.

A.5) HTML Headings


Headings help in defining the hierarchy and the structure
of the web page content.
HTML offers six levels of heading tags, <h1> through <h6>;
the higher the heading level number, the greater its
importance — therefore <h1> tag defines the most
important heading, whereas the <h6> tag defines the least
important heading in the document.
By default, browsers display headings in larger and bolder
font than normal text. Also, <h1> headings are displayed in
largest font, whereas <h6> headings are displayed in
smallest font.
<h1>Heading level 1</h1>

<h2>Heading level 2</h2>

<h3>Heading level 3</h3>

<h4>Heading level 4</h4>

<h5>Heading level 5</h5>

<h6>Heading level 6</h6>

A.6) HTML Lines


A.7) <PRE> tag
The <pre> tag in HTML is used to define the block of
preformatted text which preserves the text spaces, line
breaks, tabs, and other formatting characters which are
ignored by web browsers. Text in the <pre> element is
displayed in a fixed-width font, but it can be changed using
CSS. The <pre> tag requires a starting and end tag.

Syntax:

<pre> Contents... </pre>

A.8)<BR> Tag
The <br> tag inserts a single line break.

The <br> tag is an empty tag which means that it


has no end tag.

Tip: The <br> tag is useful for writing addresses


or poems.

Note: Use the <br> tag to enter line breaks, not


to separate paragraphs.

Example
The <br> tag inserts a single line break:
<p>To force<br> line breaks<br> in a
text,<br> use the br<br> element.</p>

A.9)<P> tag
The <p> tag defines a paragraph of text. It is a block-level
element and always starts on a new line. Before and after
each paragraph, browsers add margin automatically. You
can modify the margins using the CSS margin property .
If you need to just to move text to a new line use
the <br> tag.

Syntax
The <p> tag comes in pairs. The content is written
between the opening (<p>) and closing (</p>) tags. If the
closing tag is omitted, it is considered that the end of the
paragraph matches with the start of the next block-level
element.

Example
p {display: block;
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: 0;
  margin-right: 0;}

A.10) Font tag


The <font> tag defines the font characteristics. Size, color and typeface are
defined by the size, color and face attributes.

The <font> is a deprecated HTML tag, use CSS styles instead

Syntax
The <font> tag comes in pairs. The content is written between the opening (<font>)
and closing (</font>) tags.

Example of using HTML <font> tag:


<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<p>
<font size="2" color="#1c87c9">Blue text</font>
</p>
<p>
<font size="3" color="red">Red text, font size increased.</font>
</p>
<p>
<font face="arial" color="#8ebf42">Green text, typeface changed.</font>
</p>
</body>
</html>

A.11) Basefont Tag


The HTML <basefont> tag defines the default font-family,
font-size and color for the text in the HTML document.
Since this tag was removed in HTML5, it is recommended
that you use CSS properties such as font, font-family, font-
size and color to format the text in the document. This tag
is also commonly referred to as the <basefont> element.
Example
Specify a default text-color and font-size for text
on page:
<head>
<basefont color="red" size="5">
</head>

<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>

A.12) Comment tag


The comment tag is used to insert comments in
the source code. Comments are not displayed in
the browsers.

You can use comments to explain your code, which


can help you when you edit the source code at a
later date. This is especially useful if you have a lot
of code.

A.13) <DIV> tag


The <div> tag defines a division or a section in an
HTML document.

The <div> element is often used as a container for


other HTML elements to style them with CSS or to
perform certain tasks with JavaScript.

Tip: The <div> element is very often used


together with CSS, to layout a web page.

Example
<div style="background-color:lightblue">
  <h3>This is a heading</h3>
  <p>This is a paragraph.</p>
</div>

You might also like