HTML 74

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

1) What is HTML?

HTML is short for Hyper Text Mark up Language and is the


language of the World Wide Web. It is the standard text formatting
language used for creating and displaying pages on the Web. HTML
documents are made up of two things: the content and the tags that
format it for proper display on pages.

2) What are tags?


Content is placed in between HTML tags in order to properly
format it. It makes use of the less than symbol (<) and the greater
than symbol (>). A slash symbol is also used as a closing tag. For
example:

<strong> sample </strong>

3) What are some of the common lists that can


be used when designing a page?
You can insert any or a combination of the following list types:
– ordered list
– unordered list
– definition list
– menu list
– directory list
Each of this list types makes use of a different tag set to compose

4) How do you insert a comment in HTML?


Comments in HTML begins with “<!–“nd ends with “–>”. For
example:
<!-- A SAMPLE COMMENT -->

5) What is an image map?

Image map lets you link to many different web pages using a single
image. You can define shapes in images that you want to make part
of an image mapping.
6) How to create a Hyperlink in HTML?

The HTML provides an anchor tag to create a hyperlink that links one page to
another page. These tags can appear in any of the following ways:

 Unvisited link – It is displayed, underlined and blue.


 Visited link – It is displayed, underlined and purple.
 Active link – It is displayed, underlined and red.

The syntax of Hyperlink in HTML is:

<a href = "..........."> Link Text </a>

7) What is semantic HTML?

Semantic HTML is a coding style. It is the use of HTML markup to reinforce the
semantics or meaning of the content. For example: In semantic HTML <b> </b> tag
is not used for bold statement as well as <i> </i> tag is used for italic. Instead of
these we use <strong></strong> and <em></em> tags.

8) How to create a nested webpage in HTML?

The HTML iframe tag is used to display a nested webpage. In other words, it
represents a webpage within a webpage. The HTML <iframe> tag defines an inline
frame. For example:

<!DOCTYPE html>
<html>
<body>
<h2>HTML example</h2>
Use the height and width attributes to specify the size of the iframe:
<iframe src="https://www.edureka.co/" height="300" width="400"></iframe>
</body>
</html>

9) Explain the layout of HTML.

HTML layout specifies a way in which the web page is arranged. Every website has
a specific layout to display content in a specific manner. Following are
different HTML elements which are used to define the different parts of a webpage:

 <header>: It is used to define a header for a document or a section.


 <nav>: This defines a container for navigation links
 <section>: It is used to define a section in a document
 <article>: This is used to define an independent, self-contained article
 <aside>: It is used to define content aside from the content
 <footer>: It is used to define a footer for a document or a section
10) What is a marquee?

Marquee is used for the scrolling text on a web page. It scrolls the image or text up,
down, left or right automatically. You should put the text which you want to scroll
within the <marquee>……</marquee> tag.

Q16. What are the tags used to separate a section of texts?


There are three tags that can be used to separate the texts:

 <br> tag – Usually <br> tag is used to separate the line of text. It breaks the current
line and conveys the flow to the next line
 <p> tag – This contains the text in the form of a new paragraph.
 <blockquote> tag – It is used to define a large quoted section. If you have a large
quotation, then put the entire text within <blockquote>……….</blockquote> tag.

11) What is the difference between DIV and SPAN in HTML?

The difference between span and div is that a span element is in-line and usually
used for a small chunk of HTML inside a line,such as inside a paragraph. Whereas,
a div or division element is block-line which is equivalent to having a line-break
before and after it and used to group larger chunks of code.

Example:

<div id="HTML">
This is <span class="Web Dev">interview</span>
</div>

12) What is the purpose of using alternative texts in images?

The purpose of using alternative texts is to define what the image is about. During an
image mapping, it can be confusing and difficult to understand what hotspots
correspond to a particular link. These alternative texts come in action here and put
description at each link which makes it easy for users to understand the hotspot links
easily.
13) What is the use of an iframe tag?

An iframe is used to display a web page within a web page.

Syntax: <iframe src="URL"></iframe>

Example: <iframe src="demo_iframe.html" width="200px"


height="200px"></iframe>

Target to a link: <iframe src="http://www.edureka.co"


name="iframe_a"></iframe>

14) What are the entities in HTML?

The HTML character entities are used as a replacement for reserved characters in
HTML. You can also replace characters that are not present on your keyboard by
entities. These characters are replaced because some characters are reserved in
HTML.

15) Can you create a multi-colored text on a web page?

Yes, we can create a multi-colored text on a web page. To create a multicolor text,
you can use <font color =”color”> </font> for the specific texts that you want to color.

16) How to make a picture of a background image of a web page?

To make a picture a background image on a web page, you should put the following
tag code after the </head> tag.

<body background = "image.gif">

Here, replace the “image.gif” with the name of your image file which you want to
display on your web page.

17) HTML Tag vs. Element


An HTML element is defined by a starting tag. If the element contains other content,
it ends with a closing tag. For example, <p>is starting tag of a paragraph and </p>
is closing tag of the same paragraph but
<p>This is paragraph</p> is a paragraph element.

18) What is SVG?

HTML SVG is used to describe the two-dimensional vector and vector or raster
graphics. SVG images and their behaviors are defined in XML text files. So as XML
files, you can create and edit an SVG image with the text editor. It is mostly used for
vector type diagrams like pie charts, 2-Dimensional graphs in an X, Y coordinate
system.
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="yellow" stroke-
width="4" fill="red" />
</svg>

19) What is button tag?

The button tag is used in HTML 5. It is used to create a clickable button within the
HTML form on the web page. This tag creates a “submit” or “reset” button. The
button tag code is as follows:

<button name="button" type="button">Click Here</button>

20) List the media types and formats supported by HTML.

HTML supports a wide range of media formats for sound, music, videos, movies, and
animations. Some of the extensions supported by each media format are:

 Images– png, jpg, jpeg, gif, apng, svg, bmp, BMP ico, png ico
 Audio– MIDI, RealAudio, WMA, AAC, WAV, Ogg, MP3, MP4
 Video– MPEG, AVI, WMV, QuickTime, RealVideo, Flash, Ogg, WebM, MPEG-4 or
MP4

21) What is Cell Spacing and Cell Padding?

Cell Spacing is referred to as the space or gap between the two cells of the same
table. Whereas, Cell Padding is referred to as the gap or space between the content
of the cell and cell wall or cell border.

Example:

<table border cellspacing=3>

<table border cellpadding=3>

<table border cellspacing=3 cellpadding=3>

22) How many types of CSS can be included in HTML?

There are three ways to include the CSS with HTML:

 Inline CSS: It is used for styling small contexts. To use inline styles add the style
attribute in the relevant tag.
 External Style Sheet: This is used when the style is applied to many pages. Each
page must link to the style sheet using the <link> tag. The <link> tag goes inside the
head section.

<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
 Internal Style Sheet: It is used when a single document has a unique style. Internal
styles sheet needs to put in the head section of an HTML page, by using
the <style> tag in the following way:

<head>
<style type="text/css">
hr {color:sienna}
p {margin-left:20px}
body {background-image:url("images/back40.gif")}
</style>
</head>

23) How can you apply JavaScript to a web page?

In order to make your webpage more interactive, you need JavaScript. It is a


scripting language that allows you to interact with certain elements on the page,
based on user input. As with CSS, there are three main ways of including JavaScript:

Inline

Certain HTML elements allow you to execute a piece of JavaScript when a certain
event occurs. For example, a button allows you to run a script when you click on it.
These events are accessed through attributes and differ based on the events that
are available on each element. Here is an example that shows an alert with a
message when the user clicks on it:

Script block

You can define a script block anywhere on the page, which will get executed as soon
as the browser reaches that part of the document. This can be inside the <head> or
<body> section of your document.

<script>
var x = 5;
var y = 6;
var result = x + y;
alert(“X + Y is equal to " + result);
</script>

Link to a JavaScript file

It allows you to keep the content of the page separate to how users interact with that
content. Also, it allows you to load the same script on multiple pages. As with the
script block, you can load a JavaScript file from the <head> or <body>.

<script src="my-code.js"></script>
24) What is HTML – META TAGS

HTML lets you specify metadata - additional important information about a


document in a variety of ways. The META elements can be used to include
name/value pairs describing properties of the HTML document, such as author,
expiry date, a list of keywords, document author etc. The tag is used to provide such
additional information. This tag is an empty element and so does not have a closing
tag but it carries information within its attributes.

25)Which HTML tag is used to display the data in the tabular


form?
The HTML table tag is used to display data in tabular form (row *
column). It also manages the layout of the page, e.g., header section,
navigation bar, body content, footer section. Here is the list of tags used
while displaying the data in the tabular form:

Tag Description

<table> It defines a table.

<tr> It defines a row in a table.

<th> It defines a header cell in a table.

<td> It defines a cell in a table.

<caption> It defines the table caption.

<colgroup It specifies a group of one or more columns in a table for formatting.


>

<col> It is used with <colgroup> element to specify column properties for e


column.

<tbody> It is used to group the body content in a table.

<thead> It is used to group the header content in a table.

<tfooter> It is used to group the footer content in a table.

26)Is it possible to change the color of the bullet?


The color of the bullet is always the color of the first text of the list. So, if
you want to change the color of the bullet, you must change the color of
the text.
27) Different Attribute in html?

Here are some other common HTML attributes:

 id: specifies a unique identifier for an element


 class: specifies a class name for an element, which can be used to apply
styles to multiple elements
 src: specifies the source of an image or other media file
 alt: specifies an alternate text for an image, in case the image cannot be
displayed
 title: specifies extra information about an element, which is usually
displayed as a tooltip when the user hovers over the element

28) Diffrent phrase tag in html


HTML includes several types of phrase tags, which are used to apply
formatting or semantics to a range of text. Here are some common phrase
tags:

 em: used to emphasize a word or phrase. Browsers usually display


emphasized text in italics.
 strong: used to give importance to a word or phrase. Browsers usually
display strong text in bold.
 mark: used to highlight a word or phrase. Browsers usually display marked
text with a colored background.
 del: used to mark text that has been deleted from a document. Browsers
usually display deleted text with a strikethrough.
 ins: used to mark text that has been inserted into a document. Browsers
usually display inserted text with an underline.
 sub: used to display text as a subscript (e.g., in chemical formulas).
 sup: used to display text as a superscript (e.g., in mathematical
expressions).

Practical

1)Create Web Page With Registration Form.


2)Crate Web Page With Calculator
3)Create table on web page
4)Create page and set background image and create table
on that image.
5)Create web page with tab and frame , add some content
on frame.

You might also like