0% found this document useful (0 votes)
2 views

ICT - Exploring HTML5 Q and A

The document provides a comprehensive overview of HTML5, including its basic structure, tags, attributes, and the use of CSS. It covers essential topics such as creating web pages, inserting images, using tables, and creating hyperlinks. Additionally, it explains the functionality of various HTML tags and attributes, as well as the role of CSS in web design.

Uploaded by

Sandip Chavan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

ICT - Exploring HTML5 Q and A

The document provides a comprehensive overview of HTML5, including its basic structure, tags, attributes, and the use of CSS. It covers essential topics such as creating web pages, inserting images, using tables, and creating hyperlinks. Additionally, it explains the functionality of various HTML tags and attributes, as well as the role of CSS in web design.

Uploaded by

Sandip Chavan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Exploring HTML 5

30 Single Line Questions and Answers


1.​ Question: What type of language is HTML?

Answer: HTML is a mark-up language.

2.​ Question: What are HTML tags used for?

Answer: HTML tags are used to create web pages.

3.​ Question: Do browsers display HTML tags?

Answer: Browsers do not display the HTML tags.

4.​ Question: How can web pages be created and modified?

Answer: Web pages can be created and modified by using professional HTML editors
like Notepad and TextEdit.

5.​ Question: What extension should HTML files be saved with?

Answer: HTML files created in notepad should be saved with .html extension.

6.​ Question: What tag is used to add images in HTML?

Answer: The <img> tag is used to add images in HTML.

7.​ Question: Is the <img> tag an empty tag?

Answer: The <img> tag is an empty tag.

8.​ Question: What attribute is needed to display an image using the <img> tag?

Answer: To display an image using the <img> tag, you need to use the src attribute.

9.​ Question: What does src stand for?

Answer: src stands for the source value of the src attribute.

10.​Question: What is the function of the src attribute?

Answer: The src attribute specifies the location of the image to be displayed on a
webpage.
11.​Question: What attribute specifies an alternate text for an image?

Answer: The alt attribute specifies an alternate text for an image.

12.​Question: What tag is used to align text or images in the center?

Answer: The <center> tag is used to align text or images in the center.

13.​Question: What does the HTML <marquee> tag define?

Answer: The HTML <marquee> tag defines a moving piece of text or image in the
HTML document.

14.​Question: Which direction will text found within the <marquee> tag scroll by default?

Answer: By default, text found within the <marquee> tag will scroll from right to left.

15.​Question: What attribute of the marquee tag is used to change the type of scrolling?

Answer: The behavior attribute of the marquee tag is used to change the type of
scrolling.

16.​Question: What tag defines subscript text?

Answer: The <sub> tag defines subscript text.

17.​Question: What tag defines superscript text?

Answer: The <sup> tag defines superscript text.

18.​Question: What tag is used to create a table in HTML?

Answer: The <table> tag is used to create a table in HTML.

19.​Question: What tags are tables divided into?

Answer: Tables are divided into rows using the <tr> tag and columns using the <td>
tag.

20.​Question: What tag creates a table header?

Answer: The <th> tag creates a table header.

21.​Question: What does the <td> tag create?

Answer: The <td> tag creates table cell data.


22.​Question: What tag defines a table caption?

Answer: The <caption> tag defines a table caption.

23.​Question: What is a hyperlink?

Answer: A hyperlink is a text or image which connects a web page to another web page
or another part of the same web page.

24.​Question: What tag is used to create hyperlinks?

Answer: The anchor tag <a> is used to create hyperlinks.

25.​Question: What attribute of the <a> tag specifies the location to which the created
hyperlink will be linked?

Answer: The href attribute of the <a> tag specifies the location to which the created
hyperlink will be linked.

26.​Question: What is the extension of an HTML file?

Answer: .html is the extension of an HTML file.

27.​Question: What is Cellpadding?

Answer: Cellpadding is the space between cell data and border.

28.​Question: What is Cellspacing?

Answer: Cellspacing is the space between cells.

29.​Question: What is CSS?

Answer: CSS stands for Cascading Style Sheets.

30.​Question: What is the use of CSS?

Answer: CSS is used to manage the presentation part of the web page.
10 Two-to-Three Line Questions and Answers
1.​ Question: How do images improve a webpage, and how are they added in HTML?

Answer: Images can improve the design and appearance of a webpage. In HTML,
images are added with the <img> tag. To display an image, the src attribute, which
specifies the URL of the image, is needed.

2.​ Question: What is the purpose of the alt attribute in the <img> tag, and when is it
useful?

Answer: The alt attribute specifies an alternate text for an image, which is displayed if
the user cannot view the image. This is useful if the image is not loading or for users who
have images disabled.

3.​ Question: Explain the use of the <center> tag in HTML. What does it do, and when is
it useful to use this tag?

Answer: The <center> tag is used to center-align the text or images. It is useful when
there is a need to align an image in the center.

4.​ Question: What is the HTML <marquee> tag, and what does it do to the text or image
within it?

Answer: The HTML <marquee> tag defines a moving piece of text or image in the
HTML document that scrolls across the page in a vertical or horizontal direction
depending on the settings. By default, text found within the <marquee> tag will scroll
from right to left.

5.​ Question: Explain the purpose of subscript and superscript tags. Provide examples of
when each tag might be used.

Answer: The <sub> tag defines subscript text, which appears in a smaller size below
the normal line. For example, H2O uses subscript. The <sup> tag defines superscript
text, which appears smaller in size above the normal line, as in mathematical formulas
like x2 + y2 = 0.

6.​ Question: How are tables created in HTML, and what are the main tags used in the
table structure?

Answer: In HTML, tables are created using the <table> tag. Tables are divided into
rows and columns using the <tr> and <td> tags, respectively. The <th> tag is used to
create table headers, and the <caption> tag defines a table caption.
7.​ Question: What is the purpose of hyperlinks in web pages? Explain how hyperlinks are
created in HTML.

Answer: Hyperlinks allow users to click their way from page to page. In HTML,
hyperlinks are created using the anchor tag <a>. The href attribute of the <a> tag
specifies the location to which the created hyperlink will be linked.

8.​ Question: Describe the three different types of hyperlinks.

Answer: The three types of hyperlinks include links to connect two web pages, links to
connect two sections of the same web page, and website links and email links.

9.​ Question: Explain what CSS is and its primary function in web development.

Answer: CSS stands for Cascading Style Sheets. Its main benefit is that it can change
the look and feel of all the web pages of a website by changing the content of just one
single .css file. CSS is used to manage the presentation part of the web page.

10.​Question: What are the three parts of CSS?

Answer: The three parts of CSS are selector, property, and value. Selectors are
elements to be modified, properties are elements whose property is to be modified, and
value changes the property according to the given value.

10 Big Questions and Answers


1.​ Question: Explain the basic structure of an HTML document and the role of HTML tags
and attributes in creating a webpage.

Answer: HTML (Hypertext Markup Language) is a markup language used to create web
pages. The basic structure of an HTML document consists of a series of elements,
including tags and attributes. Tags are commands that define different parts of the
webpage, such as headings, paragraphs, and images. Attributes provide additional
information about HTML elements; for example, the src attribute in the <img> tag
specifies the source URL of an image. Browsers read these tags to render the content of
the page. HTML files should be saved with a .html extension.

2.​ Question: Describe how to insert images into an HTML document, detailing the
attributes that can be used to control the appearance and behavior of images on the
page.

Answer: Images can be inserted into an HTML document using the <img> tag. The src
attribute is essential as it specifies the source URL of the image. Additional attributes
can be used to control the appearance and behavior of the image. The alt attribute
provides alternate text if the image cannot be displayed. The width and height attributes
define the width and height of the image in pixels. The border attribute sets the border
thickness around the image.

3.​ Question: What is the marquee tag in HTML, and how can its attributes be used to
modify the scrolling behavior, direction, and appearance of the text or image?

Answer: The HTML <marquee> tag is used to create a scrolling text or image on a
webpage. By default, the text scrolls from right to left. Several attributes can modify its
behavior. The behavior attribute defines the type of scrolling (e.g., scroll, slide, alternate).
The bgcolor attribute defines the background color of the marquee. The direction
attribute specifies the direction of scrolling (up, down, left, right). The height and width
attributes set the height and width of the marquee. The loop attribute specifies the
number of times the marquee loops.

4.​ Question: How are tables created in HTML, and what attributes can be used to format
and structure the table and its contents effectively?

Answer: Tables in HTML are created using the <table> tag, which organizes data in
rows and columns. Rows are created using the <tr> tag, table headers are created
using the <th> tag, and individual data cells are created using the <td> tag. The
<caption> tag defines a table caption. Attributes like align, bgcolor, border, cellspacing,
cell padding, width, and height can be used to format and structure the table.
Cellspacing is the space between cells, and cell padding is the space between the cell
border and its contents.

5.​ Question: Explain how hyperlinks work in HTML, detailing the different types of links
that can be created and the attributes used to specify the link's destination and behavior.

Answer: Hyperlinks in HTML are used to link web pages to other pages, sections within
the same page, or external resources. The <a> tag is used to create hyperlinks. The href
attribute specifies the destination of the link. There are three types of hyperlinks: links to
connect two web pages, links to connect two sections of the same web page, and
website links and email links. To link to a specific part of a webpage, you can use the <a
id="name"> tag to mark the section and then create a link to it using <a
href="#name">. For email links, you can use <a href="mailto:email
address">.

6.​ Question: What are Cascading Style Sheets (CSS), and how are they used to control
the presentation and layout of HTML elements on a webpage?

Answer: CSS (Cascading Style Sheets) is used to control the presentation and layout of
HTML elements on a webpage. CSS is used to manage the presentation part of the web
page. CSS describes how HTML elements are to be displayed on screen. CSS can be
added to HTML in three ways: Inline, Internal and External.

7.​ Question: Explain the differences between inline, internal, and external CSS, and
provide examples of when each approach might be most appropriate.

Answer: There are three ways to add CSS to HTML: inline, internal, and external. Inline
CSS is applied directly within HTML elements using the style attribute. Internal CSS is
defined within a <style> element in the <head> section of an HTML page. External
CSS uses an external .css file linked in the <head> section. Inline CSS is suitable for
applying unique styles to individual elements. Internal CSS is useful for styling a single
HTML page. External CSS is best for styling multiple pages consistently across an entire
website.

8.​ Question: How can the <div> and <span> tags be used to group and style HTML
elements, and what are the key differences between these two tags?

Answer: The <div> and <span> tags are used to group and style HTML elements, but
this source does not provide details on these tags.

9.​ Question: What are HTML frames, and how can they be used to divide a browser
window into multiple independent sections, each displaying a separate HTML
document?

Answer: HTML frames are used to divide a browser window into multiple sections, each
displaying a separate HTML document. The <frameset> tag defines the group of
frames, and the <frame> tag defines each individual frame within the frameset. The
cols and rows attributes of the <frameset> tag specify the layout of the frames in
columns or rows. The src attribute of the <frame> tag indicates the file to be displayed
in the frame.

10.​Question: Describe the purpose and usage of HTML forms, including the various input
types and attributes that can be used to create interactive forms for collecting user data.

Answer: This source does not provide details on forms.

11. Question: what are tables in HTML? Define its structure.

Answer: In HTML, tables are used to present data in a tabular form using the <table>
tag. Tables are divided into rows and columns using the < tr>, <th>, and <td> tags.

Here is the structure of a table:

●​ <table>...</table>: Creates a table with a combination of rows and columns.


●​ <th>...</th>: Creates a table header.
●​ <tr>...</tr>: Creates a table row.
●​ <td>...</td>: Creates table cell data, which is also called the data container.
●​ <caption>: Defines a table caption.

Tables can contain various types of information, including numbers, text elements,
images, and multimedia objects. You can set a border for a table using the border
attribute. For example: <table border=2>. Also, tables can be used to organize
calendars, schedules, statistics, or other types of information.

12. Question: Describe different types of hyperlinks with their syntax.

Answer: There are three types of hyperlinks:

●​ Link to connect two web pages. For this type of link, the address and location of a
webpage that you want to link to has to be specified. The syntax is: <A href =
"filename.html"> text </A>.
●​ Link to connect two sections of the same webpage. To link to two sections of the
same webpage, the sections have to be marked with some name using the name
attribute. The syntax is: <A id = "#name"></A>. Then a hyperlink can be created
to the created name from any other part of the webpage as follows: <A href=
"#name"> Text </A>.
●​ Website links and email links. To link to a page to a website, the URL of the
website is specified with the href attribute. The syntax is: <A href = "URL of the
web page"> Text </A>. To link to an email compose box, the following syntax is
used: <A href = "mailto: email address> text </A>.

13. Question: What Are CSS? Describe the different parts of CSS.

Answer: CSS stands for Cascading Style Sheets. CSS is used to manage the
presentation part of a webpage. The main benefit of CSS is that it allows for changing
the look and feel of a website by adjusting just one single .css file. CSS describes how
HTML elements are to be displayed on a screen, saving a lot of work, and can control
the layout of multiple webpages all at once.

CSS has three parts:

●​ Selector: Element which is to be modified.


●​ Property: Elements whose property is to be modified (for example, color, size,
font etc.).
●​ Value: Change the property according to the given value.

The syntax is: selector { property: value }.


14. Question: What Are frames? How can we create frames in HTML?

Answer: Frames divide a browser window into several pieces or panes, each containing
a separate HTML document. The <frame> tag defines one particular window (frame)
within a <frameset> tag. A webpage can be divided into columns or rows using cols or
rows attributes of a <frameset> tag respectively.

Here is an example of how to create frames in HTML:

<frameset cols="25%,*,25%">

<frame src="Frame_A.htm">

<frame src="Frame_B.htm">

<frame src="Frame_C.htm">

</frameset>

15. Question: What is the use of alternate text in an image?

Answer: The alt attribute displays alternate text for an image if the user cannot view it.

16. Question: Can we use only text as a hyperlink?

Answer: No, hyperlinks can also apply to an image.

17. Question: Do all tags come in a pair?

Answer: No, not all HTML tags come in a pair. The <frame> tag is always an empty
tag and therefore should not have any content. Also, the <img> tag is an empty tag.

18. Question: Differentiate between Internal CSS and External CSS

Answer:

Here are the key differences between Internal CSS and External CSS, according to the
sources:

Internal CSS:

●​ An internal CSS is used to define a style for a single HTML page.


●​ The code is written within the <head> section of an HTML page, within a <style>
element.
External CSS:

●​ An external style sheet is used to change the look of an entire website by


changing one file as it defines the style for multiple HTML pages.
●​ To use an external style sheet, add a link to it in the <head> section of the HTML
page.

19. Question: Differentiate between Cellspacing and Cellpadding.

Answer: Here are the key differences between Cellspacing and Cellpadding in HTML
tables:

●​ Cellspacing is the space between cells.


●​ Cellpadding is the space between the edge of the cell and its contents.

20. Question: tr and td

Answer: Here are the key differences between the < tr> and <td> tags:

○​ < tr> tag is used to add a row to the table.


○​ <td> tag is used to add data/cell to the cells of the row.

You might also like