Sample Questions-2

Short Questions

Q. 16. How would you display the given table on an HTML webpage?
50 pcs 100 500
10 pcs 5 50
Ans. The HTML Code for the problem depicted above is: < table>
< tr>
< td>50 pcs< /td>
< td>100< /td>
< td>500< /td>
< /tr>
< tr>
< td>10 pcs< /td>
< td>5< /td>
< td>50< /td>
< /tr>
< /table>

Q. Which HTML tag is used to display the data in the tabular form??
Ans. 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:

<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 each 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.

Q. Difference Between Browser & Editors

A web browser is a software or application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen.
The earliest known browser was the graphical user interface (GUI) developed by the National Center for Supercomputer Applications (NCSA) The first Web browser with a graphical user interface was Mosaic.
Few browsers are :
1. Google Chrome:The Google browser created in 2008.
2. Mozilla Firefox:in the second position of the most used browsers.
3. Microsoft Edge:used a replacement for Internet Explorer, with Windows 10.
4. Safari:a browser for Apple computers and mobile devices.
5. Lynx:a fast and stable browser that's compatible with most relatively operating systems
6. Opera:used a replacement for Internet Explorer, with Windows 10.

HTML text editors are used to create and modify web pages. HTML codes can be written in any text editor including the notepad. We save the HTML file with an extension “.html” or “.htm”.
Some of the popular HTML text editors are given below:
1. Notepad:Notepad is a simple text editor. It is an inbuilt desktop application available in Windows OS.
2. Sublime Text 3:Sublime is a cross platform code editor tool. It supports all markup languages.
3. Atom:Atom is an open source code editor tool for MAC, Linux and Windows.
4. Visual Studio Code:Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS.

Q. What is the Difference between Website & Webserver?
Ans. A website is a set of connected web pages which are inter-linked by logical pointers called hyperlinks.

A Web server is an application program that runs on the host computer and manages the web pages stored on the website’s repository. Its purpose is to provide the information and services to the Web users.

Website uses different web pages to display information.

Web server uses WWW to display websites.

Q. What is Hyperlink? Describe the syntax of hyperlink.
Ans. Hyperlink is a connection from one web resource to another. A link has two ends, An anchor and direction. The link starts at the “source” anchor and points to the “destination”. The most important attribute of the < a > element is the href attribute, which indicates the link's destination. Syntax < a href="">text< /a> example < a href="https://bharatmera.in/">Bharatmera< /a>

Q. What is the difference between colspan & rowspan?
Ans. The rowspan and colspan are the attributes of tag. These are used to specify the number of rows or columns a cell should merge. The rowspan attribute is for merging rows and the colspan attribute is for merging columns of the table in HTML.

Colspan attribute merges two or more columns into a single column. Rowspan attribute merges two or more rows into a single row.

< td rowspan="2">cell data< /td>
< td colspan="2">cell data< /td>

Q. What is inline frame (iframe)?
Ans. An inline frame (iframe) is a HTML element that loads another HTML page within the document. They are commonly used for advertisements, embedded videos, web analytics and interactive content.

The ” iframe ” tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders.

Q. What is CSS & Define types of CSS?
Ans. Cascading Style Sheet (CSS) is used to set the style in web pages that contain HTML elements. It sets the background color, font-size, font-family, color, etc. properties of elements on a web page.
There are three types of CSS which are given below:
Inline CSS: Inline CSS contains the CSS property in the body section attached to the element is known as inline CSS. This kind of style is specified within an HTML tag using the style attribute.

Internal or Embedded CSS: This can be used when a single HTML document must be styled uniquely. The CSS rule set should be within the HTML file in the head section i.e. the CSS is embedded within the "style" tag inside the head section of the HTML file.

External CSS: External CSS contains separate CSS files that contain only style properties with the help of tag attributes. CSS property is written in a separate file with a .css extension and should be linked to the HTML document using a link tag.
< link rel="stylesheet" href="custom.css" />

Q. Describe 7 HTML Input Types
1. < input type="text" >
2. < input type="Date" >
3. < input type="Password" >
4. < input type="number" >
5. < input type="checkbox" >
6. < input type="radio" >
7. < input type="email" >