You are on page 1of 19

Q.

What are <br> tags in


HTML?
Answer: <br> tags are used to
enter a new line into the
HTML contents. These tags
are generally used to separate
two different lines of text
between each other.

Explain list elements in


HTML.
Answer: Enlisted below are
the list elements in HTML:
 Ordered List (<ol>) – An
Ordered List or ol tag is the list
that lists the items in an
ordered way, i.e. numbered or
alphabetically.
 Unordered List (<ul>) – An
Unordered List or ul tag is the
list which will list the items in
an unordered way, i.e. in
bulleted format or in any other
format.
In how many ways can a
heading be written in HTML?
Answer: A heading can be
defined as a block-level
element that is used to give a
heading to a particular section
or topic.
Example using 6 types of
headings in HTML:
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>

ow are hyperlinks inserted in


the HTML webpage?
You can insert a hyperlink in
the HTML webpage by using
the following code:
<!DOCTYPE html>
<html>
<body>
<h2>HTML Hyperlink
Example</h2>
<a href="url">link text</a>
</body>
</html>

What is the role of the <head>


tag in HTML?
The <head> tag defines
information about the web
page that is not displayed on
the page itself, such as its title,
keywords, and other metadata.
It is located between the
<html> and <body> tags and is
usually the first element in the
document.

Add class comment…ost


Announcement: "What is an
element in HTML? An
element…"
n element in HTML is a set of
tags that define a specific part
of a web page. It consists of a
start tag, content, and an end
tag.

What is the difference between


HTML and CSS?
HTML is used to create the
structure and content of a web
page, while CSS is used to
define the appearance and
layout of the page.

How do you create links to


different sections within the
same HTML web page?
We use the <a> tag, along with
referencing through the use of
the # symbol, to create several
links to different sections
within the same web page.

How do you create a hyperlink


in HTML?
We use the anchor tag <a> to
create a hyperlink in HTML
that links one page to another
page. The hyperlink can be
added to images too.

What are the different types of


headings in HTML?
There are six types of heading
tags in HTML which are
defined with the <h1> to <h6>
tags. Each type of heading tag
displays a different text size
from another. <h1> is the
largest heading tag and <h6>
is the smallest. For example:
<!DOCTYPE html>
<html>
<body>
<h1>This is Heading
1</h1>
<h2>This is Heading
2</h2>
<h3>This is Heading
3</h3>
<h4>This is Heading
4</h4>
<h5>This is Heading
5</h5>
<h6>This is Heading
6</h6>
</body>
</html>
hat is HTML?

HTML stands for HyperText


Markup Language and is the
language of
the internet. It is the standard
text formatting language used
for creating and
displaying pages on the
Internet

HTML documents are made


up of the elements and the tags
that
format it for proper display on
pages.

What are HTML tags?

We use HTML tags for placing


the elements in the proper and
appropriate format. Tags use
the symbols <, and > to set
them apart from
the HTML content.
The HTML tags need
not be closed always. For
example, in the case of images,
the closing tags are
not required as <img> tag.

What are HTML


Attributes?

Attributes are the properties


that can be added to an HTML
tag.
These attributes change the
way the tag behaves or is
displayed. For example, a
<img> tag has an src attribute,
which you use to add the
source from
which the image should be
displayed.

We add attributes right after


the name of the HTML tag,
inside
the brackets. We can only add
the attributes to opening or
self-closing tags,
but never be in closing tags.

Define the list


types in HTML?

The list types in HTML are as


below:

·
Ordered list–The ordered list
uses <ol> tag and displays
elements in a numbered
format.

·
Unordered list–The unordered
list uses <ul> tag and
displays elements in a bulleted
format.

·
Definition list–The definition
list uses <dl>, <dt>,
<dd> tags and displays
elements in definition form
like in a dictionary.

Differentiate
between an Ordered list and an
Unordered list?

An unordered list uses <ul>


</ul> tags and each
element of the list is written
between <li> </li> tags. The
list
items are displayed as bullets
rather than numbers.

An ordered list uses <ol>


</ol> tags and each
element of the list is written
between <li> </li> tags. The
list items
are displayed as numbers
rather than bullet points.
<!DOCTYPE html>

<html>

<body>

<h2>HTML List
Example</h2>

<ul>
<li>Coffee</li>
<li>Tea</li>

<li>Milk</li>

</ul>

<ol>

<li>Coffee</li>
<li>Tea</li>

<li>Milk</li>

</ol>

</body>

</html>

You might also like