IMPORTANT QUESTIONS
Concepts of Internet
Q. Explain
1) Internet
2) Internet Based Services
3) WWW
4) HTTP
5) URL
6) Website
7) Web Server
8) Web Browser
9) SMTP Server
10) ISP
11) HTML Hyperlink
12) DNS
13) W3C
14) Web browser types
15) Web server types
a. Apache HTTP Server
b. Internet Information Services
c. lighttpd
d. Sun Java System Web Server
e. Jigsaw Server
Q. Explain advantages of website
• Business is open 24x7
• Increased Customer Base
• Tremendous Cost Saving
• Advertising Opportunities
• Creates a Brand Image
• Customer Satisfaction
• Showcase your work
Q. What are Web domain names. Name a few
• .com - Stands for company/commercial, but it can be used for any web site.
• .net - Stands for network and is usually used for a network of sites.
• .org - Stands for organization and is supposed to be for non-profit bodies.
• .us, .in - They are based on your country names so that you can go for country specific
domain extensions.
• .biz - A newer extension on the Internet and can be used to indicate that this site is purely
related to business.
• .info - Stands for information. This domain name extension can be very useful, and as a
new comer it's doing well.
• .tv - Stands for Television and are more appropriate for TV channel sites.
Q. Name two widely used hosting platforms
• Windows Hosting Servers : If you are a Windows lover then you will find many hosting
servers running different flavours of Windows and you can buy space from these servers.
Normally Windows hosting server are more expansive because of lot of software incensing
costs are involved with these servers
• Linux Hosting Servers: If you want to go for Linux then opportunities are unlimited and
they will have to pay less than what you will pay for Windows Hosting Server. There are
many ISP who provides Hosting Servers with different flavours of Unix.
Q. Explain types of website hosting
There are many options available and you can select any hosting type based on your requirement
and budget. Following are most widely used hosting types:
• Free Hosting: Yes, this is true there are many service providers who will give you free space
on their web server with a condition that you will allow them to run their advertisement at your
web pages. So if you are OK with this option then you have nothing to pay for a space. There
are some web sites like geocities.com, lycos.com, myspace.com etc. who give you space to
build your web pages.
• Shared Hosting: With shared hosting, your web site is hosted on a powerful server along with
other web sites. On a shared host you will have your own user ID and password to login to the
shared host and you will be allowed to work in your work area. You would not be able to touch
any file or directory belonging to other host partner. Even you would not know how many sites
are hosted on your shared host. This type of hosting is very cost effective and good for small
web site where your space and speed are not very important. Here traffic on one site will affect
the speed of all other hosted sites.
• Virtual Dedicated Hosting: This type of hosting is better for medium size business. With
virtual dedicated hosting you will have a dedicated bandwidth and dedicated RAM for your
site. You will be given root ID and password to maintain your Web server. You will be
complete owner of your virtual dedicated server and will be able to install or de-install any
software. This type of hosting is created on a single server but it is managed in such a way that
every user will have dedicated speed and bandwidth. This is bit more expansive but really good
one for medium size business.
• Dedicated Hosting: This type of hosting is very similar to virtual dedicated hosting but here
complete machine will be allotted for you. They are more expansive than virtual dedicated
hosting and should be considered when you have a very high traffic requirement.
• Collocated Hosting: This is very difficult to set you dedicated resources like high-security
against fire and vandalism, regulated backup power, dedicated Internet connections and more.
So collocation is the option which allows you to put your machine in a service provider's
premises to avail all the available facilities. This is also a very expansive option and should be
opted when you have very high traffic requirement.
Q6. Explain E-Commerce
Ecommerce is a way of doing business through Internet. Especially when you are selling your
product or services through Internet then you are doing ecommerce.
So if you planning to put a web site which will have transactions likes buying or selling items or
services then it means you are going to setup an ecommerce web site. If this is the case then I don't
think this guide will help you upto a level where should be able to setup an ecommerce site because
there are many more things which should be considered while setting up an ecommerce web site.
Still you can start from here : E-commerce hosting are bit expansive but they should not be treated
as expansive that you cannot start an ecommerce web site. Now a days it is very easy to set up an
ecommerce site only thing is that just get in touch of any good service provider and start gathering
basic information.
There many service providers who help you to setup your virtual store and charge you
unexpectedly very low. Even now Google also has started Google account service in which you
can sell your products through them and all the money will come in your account without any
hassle.
While finalizing your ecommerce hosting setup, to avoid any future risk you should be very clear
on how to handle the followings:
• Customer Registrations
• Customer Transactions
• Product Catalogues
• Customer Orders
• Order Security
• Server Security
• Server Maintenance
• Server Backup
• Server downtime
• Inventory Control
• Shipment Methods
• Payment Methods
• Foreign currency
• Credit Cards
• Taxes issues
Q7. What do you understand by Website statistics?
Your site is up and running. But this is very important for you to know who is coming on your site
and what they using. There are following components which should be available to you.
• Who is visitor? You should have your site visitor IP address available with you to know the
geographical location and identity of that visitor.
• Visitors Timestamp: This is important to know what time most of the visitors are visiting
your site so in case if you plan a server down then you can decide it very easily. Second
timestamp and IP address will help you to identify your site visitor in case an investigation is
required against a site visitor.
• What visitor is using? What pages did the site visitor view on your web site will give you an
idea about the importance of various sections of your web site.
• How visitors came? This is another important information you should be aware of. How you
are getting your site visitors. Are they coming directly or coming through some other web site
or advertising program
• How long stay? - How long a site visitor is staying at your site. This is important for you to
know this duration if visitors are leaving your site just after browsing 1 or 2 pages then you
should think some way to retain them for long time on your site.
• Visitors Browser: This information is important to improve your web site for that type of web
browsers.
Q8. Explain LAN & WAN.
Local Area Networks
It makes sense, most often for financial reasons but also for others, to network
groups of computers where they share a common workload. Networking computers
means that the people using them can share files easily, send each other messages
and share each other’s printers. This idea has developed into Local Area Networks
(LANs). Nowadays most organisations have a local area network. LANs can be as
small as just one shared office or as large as a whole city.
Wide Area Networks
In some cases an organisation is spread over a large area, and you do not have the
easy concentration of computing to provide a LAN for. In this instance computers
may be connected by a Wide Area Network (WAN). The difference between a
WAN and a LAN is partly one of scale (although this is relative) but also relates to
the technology. With a LAN you will typically get a fast network that can network
PC file servers. With a WAN the network will often be much slower and will
usually involve some mainframe computer as the server rather than a PC.
HTML
Q. Define HTML. Explain its basic structure.
Q. Explain <!DOCTYPE> declaration
The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the
HTML used in the document. Current version of HTML is 5 and it makes use of the following
declaration.
Q. Explain html basic tags
• Heading Tags
• Paragraph Tag
• Line Break Tag
• Horizontal Lines
• Preserve Formatting
Q. Explain html Elements
An HTML element is defined by a starting tag. If the element contains other content, it ends with
a closing tag, where the element name is preceded by a forward slash as shown below with few
tags:
Start Tag Content End Tag
<p> This is paragraph content. </p>
<h1> This is heading content. </h1>
<div> This is division content. </div>
<br />
So here <p>....</p> is an HTML element, <h1>...</h1> is another HTML element. There are
some HTML elements which don't need to be closed, such as <img.../>, <hr /> and <br />
elements. These are known as void elements.
HTML documents consist of a tree of these elements and they specify how HTML documents
should be built, and what kind of content should be placed in what part of an HTML document.
Q. Explain nested html Elements
• Italic
• Underline
• Bold
Q. Explain html Attributes
An attribute is used to define the characteristics of an HTML element and is placed inside the
element's opening tag. All attributes are made up of two parts: a name and a value:
• The name is the property you want to set. For example, the paragraph <p> element in the
example carries an attribute whose name is align, which you can use to indicate the
alignment of paragraph on the page.
• The value is what you want the value of the property to be set and always put within
quotations. The below example shows three possible values of align attribute: left,
center and right.
Attribute names and attribute values are case-insensitive. However, the World Wide Web
Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4
recommendation.
Core Attributes
The four core attributes that can be used on the majority of HTML elements (although not all)
are:
• id
• title
• class
• style
as mentioned in previous section.
Generic Attributes
Here's a table of some other attributes that are readily usable with many of the HTML tags.
align, valign, bgcolor, background, id, class width, height , title
Q. Explain html formatting tags.
• Bold Text
• Italic Text
• Underlined Text
• Strike Text
• Monospaced font
• Superscript Text
• Subscript Text
• Inserted Text
• Deleted Text
• Larger Text
• Smaller Text
.
Q. How to group content in html
The <div> and <span> elements allow you to group together several elements to create sections
or subsections of a page.
Q. Explain phrased text in html
• Emphasized Text
• Marked Text
• Strong Text
• Text Abbreviation
• Acronym Element
• Text Direction
• Quoting Text
• Short Quotations
Q. Explain html comments
HTML comments are placed in between <!-- ... --> tags. So any content placed with-in <!-- ... --> tags
will be treated as comment and will be completely ignored by the browser.
Conditional Comments
Conditional comments only work in Internet Explorer (IE) on Windows but they are ignored by other
browsers. They are supported from Explorer 5 onwards, and you can use them to give conditional
instructions to different versions of IE.
Q. Explain html image tag
<img src="test.png" alt="Test Image" width="150" height="100"/>
<img src="test.png" alt="Test Image" border="3" align="right"/>
Q. Explain html tables
Cellpadding and Cellspacing Attributes
There are two attribiutes called cellpadding and cellspacing which you will use to adjust the
white space in your table cells. The cellspacing attribute defines the width of the border, while
cellpadding represents the distance between cell borders and the content within a cell.
Colspan and Rowspan Attributes
You will use colspan attribute if you want to merge two or more columns into a single column.
Similar way you will use rowspan if you want to merge two or more rows.
Tables Backgrounds
You can set table background using one of the following two ways:
• bgcolor attribute - You can set background color for whole table or just for one cell.
• background attribute - You can set background image for whole table or just for one cell.
You can also set border color also using bordercolor attribute.
Table Caption
The caption tag will serve as a title or explanation for the table and it shows up at the top of the
table. This tag is depracated in newer version of HTML/XHTML.
Table Header, Body, and Footer
Tables can be divided into three portions: a header, a body, and a foot. The head and foot are
rather similar to headers and footers in a word-processed document that remain the same for every
page, while the body is the main content holder of the table.
The three elements for separating the head, body, and foot of a table are:
• <thead> - to create a separate table header.
• <tbody> - to indicate the main body of the table.
• <tfoot> - to create a separate table footer.
A table may contain several <tbody> elements to indicate different pages or groups of data. But
it is notable that <thead> and <tfoot> tags should appear before <tbody>
Nested Tables
You can use one table inside another table. Not only tables you can use almost all the tags inside
table data tag <td>.
Q. Explain html lists
• <ul> - An unordered list. This will list items using plain bullets.
<ul type="square">
<ul type="disc">
<ul type="circle">
• <ol> - An ordered list. This will use different schemes of numbers to list your items.
<ol type="1"> - Default-Case Numerals.
<ol type="I"> - Upper-Case Numerals.
<ol type="i"> - Lower-Case Numerals.
<ol type="a"> - Lower-Case Letters.
<ol type="A"> - Upper-Case Letters.
START ATTRIBUTE
ol type="1" start="4"> - Numerals starts with 4.
<ol type="I" start="4"> - Numerals starts with IV.
<ol type="i" start="4"> - Numerals starts with iv.
<ol type="a" start="4"> - Letters starts with d.
<ol type="A" start="4"> - Letters starts with D.
• <dl> - A definition list. This arranges your items in the same way as they are arranged in
a dictionary.
Definition List makes use of following three tags.
<dl> - Defines the start of the list
<dt> - A term
<dd> - Term definition
</dl> - Defines the end of the list
Q. Explain html text links
A webpage can contain various links that take you directly to other pages and even specific parts
of a given page. These links are known as hyperlinks.
Hyperlinks allow visitors to navigate between Web sites by clicking on words, phrases, and
images. Thus you can create hyperlinks using text or images available on a webpage.
Linking Documents
A link is specified using HTML tag <a>. This tag is called anchor tag and anything between the
opening <a> tag and the closing </a> tag becomes part of the link and a user can click that part
to reach to the linked document. Following is the simple syntax to use <a> tag.
<a href="Document URL" ... attributes-list>Link Text</a>
The target Attribute
We have used target attribute in our previous example. This attribute is used to specify the
location where linked document is opened. Following are possible options:
Option Description
_blank Opens the linked document in a new window or tab.
_self Opens the linked document in the same frame.
_parent Opens the linked document in the parent frame.
_top Opens the linked document in the full body of the window.
targetframe Opens the linked document in a named targetframe.
Use of Base Path
When you link HTML documents related to the same website, it is not required to give a complete
URL for every link. You can get rid of it if you use <base> tag in your HTML document header.
This tag is used to give a base path for all the links. So your browser will concatenate given
relative path to this base path and will make a complete URL.
<base href="http://www.tutorialspoint.com/">
Linking to a Page Section
You can create a link to a particular section of a given webpage by using name attribute. This is
a two step process.
First create a link to the place where you want to reach with-in a webpage and name it using <a...>
tag as follows:
<h1>HTML Text Links <a name="top"></a></h1>
Second step is to create a hyperlink to link the document and place where you want to reach:
<a href="/html/html_text_links.htm#top">Go to the Top</a>
Setting Link Colors
You can set colors of your links, active links and visited links
using link, alink and vlinkattributes of <body> tag.
Download Links
You can create text link to make your PDF, or DOC or ZIP files downloadable. This is very
simple, you just need to give complete URL of the downloadable file as follows:
Q. html grouping elements
Div , span
Q. Explain html forms
HTML Forms are required when you want to collect some data from the site visitor. For example
during user registration you would like to collect information such as name, email address, credit
card, etc.
The HTML <form> tag is used to create an HTML form and it has following syntax:
<form action="Script URL" method="GET|POST">
form elements like input, textarea etc.
</form>
HTML Form Controls
There are different types of form controls that you can use to collect data using HTML form:
• Text Input Controls
• Checkboxes Controls
• Radio Box Controls
• Select Box Controls
• File Select boxes
• Hidden Controls
• Clickable Buttons
• Submit and Reset Button
Text Input Controls
There are three types of text input used on forms:
• Single-line text input controls - This control is used for items that require only one line
of user input, such as search boxes or names. They are created using HTML <input> tag.
• Password input controls - This is also a single-line text input but it masks the character
as soon as a user enters it. They are also created using HTMl <input> tag.
• Multi-line text input controls - This is used when the user is required to give details that
may be longer than a single sentence. Multi-line input controls are created using
HTML <textarea> tag.
Single-line text input controls
This control is used for items that require only one line of user input, such as search boxes or
names. They are created using HTML <input> tag.
<input type="text" name="first_name" />
Password input controls
This is also a single-line text input but it masks the character as soon as a user enters it. They are
also created using HTML <input> tag but type attribute is set to password.
<input type="password" name="password" />
Multiple-Line Text Input Controls
<textarea rows="5" cols="50" name="description">
Checkbox Control
Checkboxes are used when more than one option is required to be selected. They are also created
using HTML <input> tag but type attribute is set to checkbox.
<input type="checkbox" name="physics" value="on"> Physics
Radio Button Control
Radio buttons are used when out of many options, just one option is required to be selected. They
are also created using HTML <input> tag but type attribute is set to radio.
<input type="radio" name="subject" value="physics"> Physics
Select Box Control
A select box, also called drop down box which provides option to list down various options in the
form of drop down list, from where a user can select one or more options.
<select name="dropdown">
<option value="Maths" selected>Maths</option>
<option value="Physics">Physics</option>
</select>
File Upload Box
If you want to allow a user to upload a file to your web site, you will need to use a file upload
box, also known as a file select box. This is also created using the <input> element but type
attribute is set to file.
<input type="file" name="fileupload" accept="image/*" />
Button Controls
There are various ways in HTML to create clickable buttons. You can also create a clickable
button using <input> tag by setting its type attribute to button. The type attribute can take the
following values:
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
<input type="button" name="ok" value="OK" />
<input type="image" name="imagebutton" src="/html/images/logo.png" />
Q.Explain html marquee
An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically
down your webpage depending on the settings. This is created by using HTML <marquees> tag.
Note: The HTML <marquee> tag may not be supported by various browsers so its not
recommended to rely on this tag, instead you can use Javascript and CSS to create such effects.
Syntax
A simple syntax to use HTML <marquee> tag is as follows:
<marquee attribute_name="attribute_value"....more attributes>
One or more lines or text message or image
</marquee>
The <marquee> Tag Attributes
Following is the list of important attributes which can be used with <marquee> tag.
Attribute Description
width This specifies the width of the marquee. This can be a value like 10 or 20% etc.
height This specifies the height of the marquee. This can be a value like 10 or 20% etc.
direction This specifies the direction in which marquee should scroll. This can be a value
like up, down, left or right.
behavior This specifies the type of scrolling of the marquee. This can have a value
like scroll, slide and alternate.
scrolldelay This specifies how long to delay between each jump. This will have a value like 10 etc.
scrollamount This specifies the speed of marquee text. This can have a value like 10 etc.
loop This specifies how many times to loop. The default value is INFINITE, which means that the
marquee loops endlessly.
bgcolor This specifies background color in terms of color name or color hex value.
hspace This specifies horizontal space around the marquee. This can be a value like 10 or 20% etc.
vspace This specifies vertical space around the marquee. This can be a value like 10 or 20% etc.
Q. Explain Stylesheet
Cascading Style Sheets (CSS) describe how documents are presented on screens, in print, or
perhaps how they are pronounced. W3C has actively promoted the use of style sheets on the Web
since the Consortium was founded in 1994.
Cascading Style Sheets (CSS) provide easy and effective alternatives to specify various attributes
for the HTML tags. Using CSS, you can specify a number of style properties for a given HTML
element. Each property has a name and a value, separated by a colon (:). Each property declaration
is separated by a semi-colon (;).
You can use CSS in three ways in your HTML document:
• External Style Sheet - Define style sheet rules in a separate .css file and then include that
file in your HTML document using HTML <link> tag.
• Internal Style Sheet - Define style sheet rules in header section of the HTML document
using <style> tag.
• Inline Style Sheet - Define style sheet rules directly along-with the HTML elements
using style attribute.
Q: What does CSS stand for and what is its purpose in web development?
A: CSS stands for Cascading Style Sheets. Its purpose is to control the layout and appearance of
HTML elements on a web page. CSS allows developers to separate content from design, making
it easier to maintain and update the look of a website.
Q: How do you apply a CSS style to a specific HTML element?
A: You can apply CSS to a specific HTML element by using the style attribute directly in the
HTML tag, by embedding CSS within the <style> tag in the HTML <head>, or by linking an
external CSS file using the <link> tag. For example:
Inline CSS:
html
Copy code
<p style="color: blue;">This is a blue paragraph.</p>
Internal CSS:
<head>
<style>
p {
color: blue;
}
</style>
</head>
External CSS:
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
Q: What is the difference between a class selector and an ID selector in CSS?
A: In CSS, a class selector is used to select elements with a specific class attribute, and it is
denoted by a dot (.) followed by the class name. An ID selector is used to select an element with
a specific ID attribute, and it is denoted by a hash (#) followed by the ID name.
Class selector example:
.blue-text {
color: blue;
}
html
Copy code
<p class="blue-text">This text is blue.</p>
ID selector example:
#header {
background-color: grey;
}
html
Copy code
<div id="header">This is the header.</div>
Q: How can you center a block element horizontally within its parent element using CSS?
A: To center a block element horizontally within its parent element, you can set the element’s
margin-left and margin-right to auto and specify a width for the element.
.centered-block {
width: 50%;
margin-left: auto;
margin-right: auto;
}
<div class="centered-block">This block is centered horizontally.</div>
Q: Explain the difference between padding and margin in CSS.
A: Padding is the space between the content of an element and its border, whereas margin is the
space between the border of an element and the surrounding elements. Padding affects the
element's internal spacing, while margin affects the external spacing.
Example of padding:
.box {
padding: 20px;
}
Example of margin:
.box {
margin: 20px;
}
Q: What are pseudo-classes in CSS? Give an example.
A: Pseudo-classes are keywords added to selectors that specify a special state of the selected
elements. For example, :hover applies a style when the user hovers over an element.
Example:
a:hover {
color: red;
}
<a href="#">Hover over this link</a>
Q: What is the CSS box model, and what are its components?
A: The CSS box model is a concept that describes the rectangular boxes generated for elements
in the document tree and consists of four components: content, padding, border, and margin.
1. Content: The innermost part where the text and images appear.
2. Padding: The space between the content and the border.
3. Border: The border that surrounds the padding (if any) and content.
4. Margin: The outermost space that separates the element from other elements.
Example:
.box {
margin: 20px;
border: 5px solid black;
padding: 10px;
width: 100px;
}
html
Copy code
<div class="box">This is a box.</div>
Question 8
Q: Describe the concept of "flexbox" in CSS and provide a basic example of how to center a
child element within a flex container.
A: Flexbox, or the Flexible Box Layout, is a CSS layout module designed to provide a more
efficient way to lay out, align, and distribute space among items in a container, even when their
size is unknown or dynamic.
Example of centering a child element:
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.child {
width: 100px;
height: 100px;
background-color: lightblue;
}
<div class="container">
<div class="child">Centered</div>
</div>