CSS (Cascading Style Sheets) UNIT 4

Q1. (a) What is CSS? Explain Internal, Inline and External CSS with examples.

What is CSS?

CSS stands for Cascading Style Sheets. It is used to make HTML web pages attractive and beautiful.

CSS controls the design, colour, font, size, spacing, background and layout of a webpage.

Uses of CSS:

  1. To change text colour and font size.
  2. To add background colours and images.
  3. To create borders.
  4. To control spacing and layout.
  5. To make websites attractive.

There are three types of CSS:

1. Inline CSS

Inline CSS is written directly inside an HTML tag using the style attribute.

Example:

<html>
<body>
    <h1 style="color: red;">Welcome to CSS</h1>
    <p style="font-size: 20px;">
        This is a paragraph.
    </p>
</body>
</html>

Explanation: Here, the heading colour is red and paragraph text size is 20px.

2. Internal CSS

Internal CSS is written inside the <style> tag in the <head> section of an HTML document.

Example:

<html>
<head>
<style>
h1 {
    color: blue;
}

p {
    font-size: 18px;
    color: green;
}
</style>
</head>

<body>
    <h1>Welcome to CSS</h1>
    <p>This is a paragraph.</p>
</body>
</html>

Explanation: Here, the heading colour is blue and paragraph colour is green.

3. External CSS

External CSS is written in a separate .css file and connected to an HTML file using the <link> tag.

HTML File (index.html):

<html>
<head>
<link rel="stylesheet" href="style.css">
</head>

<body>
    <h1>Welcome to CSS</h1>
    <p>This is my website.</p>
</body>
</html>

CSS File (style.css):

h1 {
    color: red;
}

p {
    color: blue;
    font-size: 20px;
}

Explanation: The design is written in a separate CSS file called style.css.

Difference between three types of CSS:

Inline CSSInternal CSSExternal CSS
Written inside HTML tag.Written inside <style> tag.Written in separate CSS file.
Used for one element.Used for one webpage.Used for multiple webpages.
Uses style attribute.Uses <style> tag.Uses <link> tag.

Q1. (b) Explain the purpose of CSS Selectors: Element Selector, Class Selector and ID Selector.

What are CSS Selectors?

CSS selectors are used to select HTML elements and apply styles to them.

There are three common types of selectors:

1. Element Selector

An element selector selects HTML elements by their tag name.

Example:

p {
    color: red;
    font-size: 18px;
}
<p>This is first paragraph.</p>
<p>This is second paragraph.</p>

Explanation: Both paragraphs will have red colour and 18px font size.

2. Class Selector

A class selector is used to apply the same style to multiple HTML elements.

It starts with a dot (.).

Example:

<html>
<head>
<style>
.heading {
    color: blue;
    font-size: 25px;
}
</style>
</head>

<body>
    <h1 class="heading">Welcome</h1>
    <p class="heading">Hello Students</p>
</body>
</html>

Explanation: Both elements with the class name heading will have blue colour and 25px font size.

3. ID Selector

An ID selector is used to apply style to a particular HTML element.

It starts with a hash (#).

Example:

<html>
<head>
<style>
#box {
    color: white;
    background-color: green;
}
</style>
</head>

<body>
    <h1 id="box">Welcome to CSS</h1>
</body>
</html>

Explanation: The heading with ID box will have white text and a green background.

Difference between Element, Class and ID Selector:

SelectorSymbolPurpose
ElementNo symbolSelects all elements of a particular tag.
Class.Selects elements with the same class.
ID#Selects an element with a particular ID.

Q2. (a) What are CSS Properties? Explain Margin, Padding, Border and Color Properties.

What are CSS Properties?

CSS properties are used to define the appearance and design of HTML elements.

For example, colour, font size, background, margin, padding and border are CSS properties.

1. Margin

Margin is the space outside an HTML element. It creates distance between two elements.

Example:

div {
    margin: 20px;
}

Explanation: It creates 20px space outside the DIV element.

2. Padding

Padding is the space between the content and the border of an element.

Example:

div {
    padding: 15px;
}

Explanation: It creates 15px space inside the element around its content.

3. Border

Border is the line around an HTML element. We can change its colour, width and style.

Example:

div {
    border: 2px solid red;
}

Explanation: It creates a 2px solid red border around the DIV element.

4. Color

The color property is used to change the colour of text.

Example:

p {
    color: blue;
}

Explanation: It changes the paragraph text colour to blue.

We can also use background-color to change the background colour.

body {
    background-color: lightyellow;
}

Difference between Margin and Padding:

  • Margin = Space outside the border.
  • Padding = Space inside the border.

Q2. (b) With example code explain DIV with ID style and creating borders.

What is DIV?

DIV stands for Division. It is an HTML tag used to create a section or container on a webpage.

It helps to group different HTML elements together.

We can apply CSS styles to a DIV using an ID selector.

Example:

<html>
<head>
<style>
#mybox {
    width: 300px;
    height: 150px;
    background-color: lightblue;
    border: 3px solid red;
    padding: 20px;
    margin: 30px;
}
</style>
</head>

<body>

<div id="mybox">
    <h2>Welcome to CSS</h2>
    <p>This is my first DIV box.</p>
</div>

</body>
</html>

Explanation:

  1. #mybox selects the DIV using its ID.
  2. width sets the width of the DIV.
  3. height sets the height of the DIV.
  4. background-color sets the background colour.
  5. border creates a red border.
  6. padding creates space inside the DIV.
  7. margin creates space outside the DIV.

Output: A light blue box with a red border containing a heading and paragraph.

Q3. Explain Grouping Selectors and Universal Selector with example.

1. Grouping Selector

A grouping selector is used when we want to apply the same CSS style to multiple HTML elements.

We separate the element names using commas (,).

Example:

<html>
<head>
<style>
h1, h2, p {
    color: blue;
    font-family: Arial;
}
</style>
</head>

<body>

<h1>Welcome</h1>
<h2>Learn CSS</h2>
<p>This is a paragraph.</p>

</body>
</html>

Explanation:

  • h1, h2 and p are grouped together.
  • All three elements will have blue text.
  • All three elements will use Arial font.

Advantage: It reduces repeated CSS code and saves time.

2. Universal Selector

The universal selector is used to select all HTML elements on a webpage.

It is represented by the star symbol (*).

Example:

<html>
<head>
<style>
* {
    color: red;
    font-family: Arial;
}
</style>
</head>

<body>

<h1>Welcome to CSS</h1>
<p>This is a paragraph.</p>
<h2>Thank You</h2>

</body>
</html>

Explanation:

  • * selects all HTML elements.
  • All text will have red colour.
  • All elements will use Arial font.

Advantage: It is useful when we want to apply common styles to the whole webpage.

Difference between Grouping and Universal Selector:

Grouping SelectorUniversal Selector
Selects multiple specified elements.Selects all elements.
Uses comma (,).Uses star (*).
Example: h1, pExample: *

Q4. Explain how CSS works with Block Elements to control layout. Give example using DIV and P tag.

What are Block Elements?

Block elements are HTML elements that start on a new line and generally occupy the full available width of their parent container.

Examples of block elements:

  1. <div>
  2. <p>
  3. <h1>
  4. <h2>
  5. <section>

How CSS works with Block Elements?

CSS is used with block elements to control the layout and appearance of a webpage.

CSS can control:

  1. Width: Sets the width of an element.
  2. Height: Sets the height of an element.
  3. Margin: Adds space outside the element.
  4. Padding: Adds space inside the element.
  5. Border: Creates a border around the element.
  6. Background: Changes the background colour.

Example using DIV and P tags

<html>
<head>
<style>

div {
    width: 400px;
    background-color: lightblue;
    border: 2px solid blue;
    padding: 20px;
    margin: 20px;
}

p {
    color: red;
    font-size: 18px;
    background-color: lightyellow;
    padding: 10px;
}

</style>
</head>

<body>

<div>
    <h2>My Website</h2>

    <p>This is the first paragraph.</p>

    <p>This is the second paragraph.</p>

</div>

</body>
</html>

Explanation:

  • DIV creates a container on the webpage.
  • Width sets the width of the DIV to 400px.
  • Background colour makes the DIV light blue.
  • Border creates a blue border around the DIV.
  • Padding adds space inside the DIV.
  • Margin adds space outside the DIV.
  • P tag creates paragraphs inside the DIV.
  • Paragraph text is red and its background is light yellow.

Conclusion

CSS helps to control the position, size, colour, spacing and design of block elements. DIV is mainly used as a container, while P is used to display paragraphs.

Quick Revision – Important Points

TopicRemember
CSSCascading Style Sheets
Inline CSSUses style attribute
Internal CSSUses <style> tag
External CSSUses .css file
Element Selectorp { }
Class Selector.name { }
ID Selector#name { }
Grouping Selectorh1, p { }
Universal Selector* { }
DIVCreates a container
MarginSpace outside border
PaddingSpace inside border
BorderLine around element
ColorChanges text colour

Exam Preparation Tip

For each question, write the definition first, then explain the points and give one example program. This will make your answers easy to understand and well-presented in the examination.

HTML – Important Questions & Answers UNIT 3

These answers include definitions, explanations, HTML syntax, examples, and complete programs. You can use them for exam preparation.

Q1. (a) Explain list tag and its types. How to create ordered list and unordered list? Explain with example. (5 Marks)

1. Definition of List in HTML

An HTML list is used to display related items in an organized manner.

HTML provides three main types of lists:

  1. Ordered List
  2. Unordered List
  3. Description List

2. Ordered List (<ol>)

An ordered list displays items in a specific order using numbers or letters.

Syntax:

<ol>
    <li>Apple</li>
    <li>Banana</li>
    <li>Mango</li>
</ol>

Output:

  1. Apple
  2. Banana
  3. Mango

Important attributes:

  • type="1" – Numbers (default).
  • type="A" – Capital letters.
  • type="a" – Small letters.
  • type="I" – Roman numbers.
  • type="i" – Small Roman numbers.
  • start="5" – Starts numbering from 5.

3. Unordered List (<ul>)

An unordered list displays items using bullet points instead of numbers.

Syntax:

<ul>
    <li>Orange</li>
    <li>Banana</li>
    <li>Mango</li>
</ul>

Output:

  • Orange
  • Banana
  • Mango

Bullet styles:

  • Disc – Filled circle.
  • Circle – Empty circle.
  • Square – Square bullet.

CSS can be used to change bullet styles.

4. Description List (<dl>)

A description list is used to display terms and their descriptions.

Example:

<dl>
    <dt>HTML</dt>
    <dd>HyperText Markup Language</dd>

    <dt>CSS</dt>
    <dd>Cascading Style Sheets</dd>
</dl>

Conclusion: HTML lists help organize information and make web pages easier to read.

Q1. (b) Divide a GIF image into two areas and create different hyperlinks for them. (5 Marks)

Definition

An image map is an HTML feature that allows different areas of a single image to have different hyperlinks.

We use the following tags:

  • <img> – Displays the image.
  • <map> – Defines an image map.
  • <area> – Defines clickable areas.

HTML Code

<!DOCTYPE html>
<html>
<head>
    <title>Image Map</title>
</head>
<body>

<h2>Clickable GIF Image</h2>

<img src="image.gif"
     width="400"
     height="200"
     usemap="#mymap"
     alt="Clickable GIF">

<map name="mymap">

    <area shape="rect"
          coords="0,0,200,200"
          href="https://www.google.com"
          alt="Google">

    <area shape="rect"
          coords="200,0,400,200"
          href="https://www.yahoo.com"
          alt="Yahoo">

</map>

</body>
</html>

Explanation

  1. image.gif is the GIF image displayed on the webpage.
  2. usemap="#mymap" connects the image with the image map.
  3. <map> defines the clickable areas.
  4. The first <area> creates a clickable left half.
  5. The second <area> creates a clickable right half.
  6. Clicking the left area opens Google.
  7. Clicking the right area opens Yahoo.

Note: The image is divided into two rectangular clickable areas of equal size.

Q1. (c) How to create row frames and column frames in HTML? (5 Marks)

Definition of Frames

Frames were used in older HTML to divide a browser window into multiple sections.

Each section could display a separate HTML document.

The <frameset> and <frame> tags were used to create frames.

Note: Frames are obsolete in HTML5. Modern websites use CSS layouts and <iframe> where appropriate.

1. Creating Row Frames

The rows attribute divides the browser window horizontally.

Example:

<html>
<head>
    <title>Row Frames</title>
</head>

<frameset rows="50%,50%">
    <frame src="top.html">
    <frame src="bottom.html">
</frameset>

</html>

Explanation:

  • rows="50%,50%" divides the browser window into two horizontal sections.
  • top.html is displayed in the upper section.
  • bottom.html is displayed in the lower section.

2. Creating Column Frames

The cols attribute divides the browser window vertically.

Example:

<html>
<head>
    <title>Column Frames</title>
</head>

<frameset cols="50%,50%">
    <frame src="left.html">
    <frame src="right.html">
</frameset>

</html>

Explanation:

  • cols="50%,50%" divides the browser window into two vertical sections.
  • left.html is displayed on the left side.
  • right.html is displayed on the right side.

Conclusion: The rows attribute creates horizontal frames, while the cols attribute creates vertical frames.

Q2. What is Form tag? Create an HTML form using Textfield, label, radiobutton and submit button. (15 Marks)

1. Definition of HTML Form

An HTML form is used to collect information from users and send it to a server for processing.

Forms are commonly used for registration, login, feedback, and contact pages.

The <form> tag is used to create an HTML form.

2. Important Form Elements

ElementPurpose
<form>Creates a form
<label>Provides a name for an input
<input type="text">Accepts text
<input type="radio">Allows selection of one option
<input type="submit">Submits the form

3. HTML Program

<!DOCTYPE html>
<html>
<head>
    <title>Student Form</title>
</head>

<body>

<h2>Student Registration Form</h2>

<form action="submit.php" method="post">

    <label for="name">Student Name:</label>
    <input type="text" id="name" name="name">
    <br><br>

    <label for="email">Email:</label>
    <input type="text" id="email" name="email">
    <br><br>

    <label>Gender:</label>

    <input type="radio"
           name="gender"
           value="Male">
    Male

    <input type="radio"
           name="gender"
           value="Female">
    Female

    <br><br>

    <input type="submit" value="Submit">

</form>

</body>
</html>

4. Explanation

  1. <form> creates the registration form.
  2. action="submit.php" specifies where the form data will be sent.
  3. method="post" sends the form data using the POST method.
  4. <label> displays the name of an input field.
  5. type="text" creates a text field.
  6. type="radio" creates a radio button.
  7. type="submit" creates a submit button.

Conclusion: HTML forms are used to collect user information and submit it to a server.

Q3. Write appropriate code in HTML to achieve the following. (15 Marks)

(i) Making an image clickable.

An image can be made clickable by placing the <img> tag inside the <a> tag.

HTML Code:

<!DOCTYPE html>
<html>
<head>
    <title>Clickable Image</title>
</head>

<body>

<a href="https://www.google.com">
    <img src="photo.jpg"
         width="200"
         height="150"
         alt="Google">
</a>

</body>
</html>

Explanation:

  • <a> creates a hyperlink.
  • href specifies the destination.
  • <img> displays the image.
  • When the user clicks the image, Google opens.

(ii) Creating a table with two columns and two rows.

HTML Code:

<!DOCTYPE html>
<html>
<head>
    <title>Student Table</title>
</head>

<body>

<table border="1">

    <tr>
        <th>Roll Number</th>
        <th>Name</th>
    </tr>

    <tr>
        <td>S101</td>
        <td>Ram</td>
    </tr>

    <tr>
        <td>S102</td>
        <td>Sham</td>
    </tr>

</table>

</body>
</html>

Output:

Roll NumberName
S101Ram
S102Sham

Explanation:

  • <table> creates a table.
  • <tr> creates a row.
  • <th> creates a heading cell.
  • <td> creates a normal data cell.
  • border="1" adds a border (legacy HTML; CSS is preferred today).

(iii) Making an unordered list containing Orange, Banana, Mango.

HTML Code:

<!DOCTYPE html>
<html>
<head>
    <title>Fruit List</title>
</head>

<body>

<h2>Fruit Names</h2>

<ul>
    <li>Orange</li>
    <li>Banana</li>
    <li>Mango</li>
</ul>

</body>
</html>

Output:

  • Orange
  • Banana
  • Mango

Explanation:

  • <ul> creates an unordered list.
  • <li> defines each list item.

Q4. What is HTML? Explain HTML document structure with example.

1. Definition of HTML

HTML stands for HyperText Markup Language.

It is the standard markup language used to create and structure web pages.

HTML is used to add headings, paragraphs, images, links, tables, lists, and forms to a webpage.

2. Features of HTML

  1. Easy to learn and use.
  2. Platform independent.
  3. Supports images and multimedia.
  4. Supports hyperlinks.
  5. Supports tables and forms.
  6. Works with CSS and JavaScript.
  7. Supported by all major web browsers.

3. Basic Structure of an HTML Document

An HTML document contains the following main tags:

TagDescription
<!DOCTYPE html>Declares HTML5 document
<html>Root element
<head>Contains page information
<title>Defines webpage title
<body>Contains visible webpage content
<h1>Defines a main heading
<p>Defines a paragraph

4. HTML Document Example

<!DOCTYPE html>

<html>

<head>
    <title>My First Web Page</title>
</head>

<body>

    <h1>Welcome to HTML</h1>

    <p>
        HTML is used to create web pages.
    </p>

    <h2>About HTML</h2>

    <p>
        HTML stands for HyperText Markup Language.
    </p>

</body>

</html>

5. Explanation of HTML Structure

1. DOCTYPE Declaration

<!DOCTYPE html>

It tells the browser that the document uses HTML5.

2. HTML Tag

<html>
</html>

It is the root element of an HTML document.

3. Head Tag

<head>
    <title>My Page</title>
</head>

It contains information about the webpage.

4. Title Tag

<title>My First Web Page</title>

It defines the title shown in the browser tab.

5. Body Tag

<body>
    <h1>Welcome</h1>
    <p>Hello World</p>
</body>

It contains all the visible content of the webpage.

Conclusion: HTML provides the basic structure of a webpage and is the foundation of web development.

Q5. What is a form? What are the major attributes of the form? Explain any six form components with example.

1. Definition of Form

An HTML form is a section of a webpage used to collect information from users.

It allows users to enter data and send it to a server.

Examples: Login form, registration form, feedback form, and contact form.

2. Major Attributes of Form Tag

AttributeDescription
actionSpecifies where form data is sent
methodSpecifies GET or POST method
nameGives a name to the form
targetSpecifies where to display the response
enctypeSpecifies how form data is encoded
autocompleteEnables or disables automatic suggestions
novalidateDisables built-in form validation

Example:

<form action="submit.php"
      method="post"
      name="studentForm"
      autocomplete="on">

    Student Name:
    <input type="text" name="name">

    <input type="submit" value="Submit">

</form>

3. Six Important Form Components

1. Text Field

Used to enter a single line of text.

<label>Name:</label>
<input type="text" name="name">

2. Password Field

Used to enter a password. The entered characters are hidden visually.

<label>Password:</label>
<input type="password" name="password">

3. Radio Button

Used to select only one option from a group.

<label>Gender:</label>

<input type="radio" name="gender" value="Male">
Male

<input type="radio" name="gender" value="Female">
Female

4. Checkbox

Used to select one or more options.

<label>Hobbies:</label>

<input type="checkbox" name="hobby" value="Reading">
Reading

<input type="checkbox" name="hobby" value="Sports">
Sports

5. Textarea

Used to enter multiple lines of text.

<label>Address:</label>

<textarea name="address"
          rows="4"
          cols="30"></textarea>

6. Submit Button

Used to submit form data to the server.

<input type="submit" value="Submit">

4. Other Form Components

ComponentHTML Code
Email<input type="email">
Number<input type="number">
Date<input type="date">
File<input type="file">
Reset<input type="reset">
Dropdown<select>
Button<button>

Conclusion: HTML forms contain different input components that help collect information from users in an organized way.

Q6. Write HTML code to make a form for registration of students of your class. Consider at least 10 attributes of students and use appropriate buttons where required.

Student Registration Form

The following HTML program creates a student registration form containing more than ten student details.

HTML Code:


<!DOCTYPE html>
<html>
<head>
    <title>Student Registration Form</title>
</head>

<body>

<h2>Student Registration Form</h2>

<form action="register.php" method="post">

    <!-- Student Name -->
    <label>Student Name:</label>
    <input type="text" name="student_name" required>
    <br><br>

    <!-- Roll Number -->
    <label>Roll Number:</label>
    <input type="text" name="roll_number" required>
    <br><br>

    <!-- Father's Name -->
    <label>Father's Name:</label>
    <input type="text" name="father_name">
    <br><br>

    <!-- Mother's Name -->
    <label>Mother's Name:</label>
    <input type="text" name="mother_name">
    <br><br>

    <!-- Date of Birth -->
    <label>Date of Birth:</label>
    <input type="date" name="dob">
    <br><br>

    <!-- Gender -->
    <label>Gender:</label>
    <input type="radio" name="gender" value="Male">
    Male

    <input type="radio" name="gender" value="Female">
    Female
    <br><br>

    <!-- Email -->
    <label>Email:</label>
    <input type="email" name="email">
    <br><br>

    <!-- Mobile -->
    <label>Mobile Number:</label>
    <input type="tel" name="mobile">
    <br><br>

    <!-- Address -->
    <label>Address:</label>
    <textarea name="address" rows="3" cols="30"></textarea>
    <br><br>

    <!-- Course -->
    <label>Course:</label>
    <select name="course">
        <option value="">Select Course</option>
        <option value="BCA">BCA</option>
        <option value="MCA">MCA</option>
        <option value="BTech">B.Tech</option>
    </select>
    <br><br>

    <!-- Class -->
    <label>Class:</label>
    <input type="text" name="class">
    <br><br>

    <!-- City -->
    <label>City:</label>
    <input type="text" name="city">
    <br><br>

    <!-- Pincode -->
    <label>Pin Code:</label>
    <input type="text" name="pincode">
    <br><br>

    <!-- Buttons -->
    <input type="submit" value="Register">
    <input type="reset" value="Clear">

</form>

</body>
</html>

Explanation

The registration form contains the following student details:

  1. Student Name.
  2. Roll Number.
  3. Father’s Name.
  4. Mother’s Name.
  5. Date of Birth.
  6. Gender.
  7. Email Address.
  8. Mobile Number.
  9. Address.
  10. Course.
  11. Class.
  12. City.
  13. Pin Code.

Buttons used:

  • Register – Submits the form data.
  • Clear – Resets the form fields.

Conclusion: HTML forms help educational institutions collect student information digitally and systematically.

Q7. What is Table tag? Explain its attributes with example.

1. Definition of HTML Table

An HTML table is used to display data in rows and columns.

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

Tables are useful for displaying student records, marksheets, employee details, and product information.

2. Important HTML Table Tags

TagDescription
<table>Creates a table
<tr>Creates a table row
<th>Creates a heading cell
<td>Creates a data cell
<caption>Adds a table title
<thead>Groups table header rows
<tbody>Groups table body rows
<tfoot>Groups table footer rows

3. Important Table Attributes

AttributeDescription
borderSets the table border (legacy)
cellpaddingAdds space inside cells (legacy)
cellspacingSets space between cells (legacy)
widthSets table width
heightSets table height
colspanCombines multiple columns
rowspanCombines multiple rows
alignSets alignment (legacy)

Note: Many old table presentation attributes such as border, cellpadding, cellspacing, width, and align are obsolete in modern HTML. CSS is preferred for styling.

4. HTML Table Example

<!DOCTYPE html>
<html>
<head>
    <title>Student Table</title>
</head>

<body>

<h2>Student Details</h2>

<table border="1" cellpadding="10">

    <caption>Student Information</caption>

    <tr>
        <th>Roll Number</th>
        <th>Name</th>
        <th>Course</th>
    </tr>

    <tr>
        <td>101</td>
        <td>Ram</td>
        <td>BCA</td>
    </tr>

    <tr>
        <td>102</td>
        <td>Sham</td>
        <td>MCA</td>
    </tr>

</table>

</body>
</html>

5. Example of Colspan and Rowspan

Colspan: Used to combine two or more columns.

<table border="1">
    <tr>
        <th colspan="2">Student Details</th>
    </tr>

    <tr>
        <td>101</td>
        <td>Ram</td>
    </tr>
</table>

Rowspan: Used to combine two or more rows.

<table border="1">
    <tr>
        <td rowspan="2">BCA</td>
        <td>Ram</td>
    </tr>

    <tr>
        <td>Sham</td>
    </tr>
</table>

6. Modern Table Using CSS

<!DOCTYPE html>
<html>
<head>
<style>
table {
    border-collapse: collapse;
    width: 60%;
}

th, td {
    border: 1px solid black;
    padding: 10px;
    text-align: center;
}
</style>
</head>

<body>

<table>
    <tr>
        <th>Roll Number</th>
        <th>Name</th>
    </tr>

    <tr>
        <td>101</td>
        <td>Ram</td>
    </tr>
</table>

</body>
</html>

Conclusion: HTML tables organize data into rows and columns, making information easy to understand.

Q8. Explain and compare Hyperlink, Hypermedia and Hypertext with example.

1. Hyperlink

A hyperlink is a clickable text, image, or other element that takes the user from one web page or resource to another.

It is created using the <a> tag in HTML.

Example:

<a href="https://www.google.com">
    Visit Google
</a>

Explanation: When the user clicks “Visit Google”, the Google website opens.

Uses:

  • Connecting web pages.
  • Opening websites.
  • Downloading files.
  • Navigating between different sections.

2. Hypertext

Hypertext is text that contains links to other documents or information.

It allows users to move from one document to another by clicking linked text.

Example:

<p>
    Learn
    <a href="https://www.wikipedia.org">
        HTML
    </a>
    for web development.
</p>

Here, the word HTML is linked to another website.

Uses:

  • Online articles.
  • Educational websites.
  • Digital books.
  • Online documentation.

3. Hypermedia

Hypermedia is an extension of hypertext that connects different types of media, such as text, images, audio, video, and animation through links.

It allows users to interact with multimedia content.

Example:

<a href="video.html">
    <img src="video.jpg"
         width="200"
         alt="Watch Video">
</a>

Here, clicking the image opens a video page.

Uses:

  • Educational websites.
  • Multimedia presentations.
  • Online tutorials.
  • Interactive learning systems.
  • Digital libraries.

4. Difference Between Hyperlink, Hypertext, and Hypermedia

BasisHyperlinkHypertextHypermedia
MeaningClickable connectionText containing linksMultimedia content containing links
ContentText, image, or other elementMainly textText, images, audio, video
PurposeNavigationConnects text documentsConnects multimedia resources
ExampleClickable imageLinked word in an articleLinked video or image
UseWebsite navigationOnline articlesInteractive multimedia learning

5. Simple Example to Understand

Hyperlink

Click here to visit Google

A clickable link that opens another resource.

Hypertext
This is an article about HTML.

A word in the text links to another document.

Hypermedia

A multimedia element, such as an image or video, can connect to another resource.

Conclusion: A hyperlink creates a connection, hypertext connects text documents, and hypermedia connects different types of multimedia content.

Quick Revision – Important HTML Tags

HTML TagPurpose
<html>Defines HTML document
<head>Contains document information
<title>Sets webpage title
<body>Contains visible content
<h1> to <h6>Creates headings
<p>Creates paragraph
<a>Creates hyperlink
<img>Displays image
<ul>Creates unordered list
<ol>Creates ordered list
<li>Creates list item
<table>Creates table
<tr>Creates table row
<th>Creates table heading
<td>Creates table data
<form>Creates form
<input>Creates input field
<label>Creates input label
<textarea>Creates multiline text field
<select>Creates dropdown list
<option>Creates dropdown option
<button>Creates button
<map>Defines an image map
<area>Defines clickable image area

Important Exam Preparation Tips

Give special attention to these topics:

  1. HTML document structure – Learn the complete HTML program.
  2. HTML Lists – Practise ordered and unordered lists.
  3. HTML Forms – Learn text fields, radio buttons, checkboxes, and submit buttons.
  4. HTML Tables – Practise rowspan and colspan.
  5. Image Mapping – Understand how to create two clickable areas in one image.
  6. Hyperlink, Hypertext and Hypermedia – Learn their differences.
  7. Student Registration Form – Practise writing the complete program.

Practical tip: Save HTML programs with the .html extension, for example student.html, and open them in Google Chrome or another web browser to see the output.

Website Development and Web Technology – Important Questions & Answers UNIT 2

Simple Language Notes for Study and Examination

Q1. Explain client-side and server-side scripting. Differentiate between them with suitable examples and applications.

1. Client-Side Scripting

Client-side scripting is a programming technique in which scripts run on the user’s computer or web browser.

It is mainly used to make web pages interactive and attractive.

Examples of client-side scripting languages:

  • JavaScript
  • HTML (used for webpage structure)
  • CSS (used for webpage styling)

Working of Client-Side Scripting:

  1. The user opens a website in a browser.
  2. The browser downloads HTML, CSS, and JavaScript files.
  3. The browser executes JavaScript code.
  4. The script performs the required operations.
  5. The result is displayed to the user.

Example: When a user clicks a button and a message appears without reloading the page, client-side scripting is used.

Applications:

  • Form validation.
  • Creating dropdown menus.
  • Image sliders.
  • Interactive buttons.
  • Animations.
  • Updating webpage content without reloading.

2. Server-Side Scripting

Server-side scripting is a programming technique in which scripts run on a web server.

It is mainly used to process user requests, manage databases, and generate dynamic web pages.

Examples of server-side scripting languages:

  • PHP
  • Python
  • Java
  • ASP.NET
  • Node.js (JavaScript runtime)

Working of Server-Side Scripting:

  1. The user opens a website.
  2. The user submits a request or form.
  3. The request is sent to the web server.
  4. The server executes the required script.
  5. The script may communicate with a database.
  6. The server sends the result to the browser.

Example: When a user enters a username and password, the server checks the login details in the database and returns the result.

Applications:

  • User login and registration.
  • Online shopping websites.
  • Payment processing.
  • Database management.
  • User account management.
  • Content management systems.

3. Difference Between Client-Side and Server-Side Scripting

BasisClient-Side ScriptingServer-Side Scripting
ExecutionRuns in browserRuns on server
ProcessingUser’s deviceWeb server
Main purposeUser interactionData processing
SpeedUsually fast for local tasksDepends on server and network
Database accessUsually through server APIsCan directly access databases
SecurityCode is generally visible to usersServer code remains private
InternetSome tasks work offlineUsually requires server communication
LanguagesJavaScriptPHP, Python, Java, etc.
ExampleForm validationUser login

Conclusion: Client-side scripting improves the user experience, while server-side scripting manages data and performs important operations on the server.

Q2. What is web hosting? Explain the different types of web hosting with their features, advantages, and disadvantages.

1. Definition of Web Hosting

Web hosting is a service that provides storage space and resources on a server to store website files and make them available on the Internet.

When someone enters a website address in a browser, the hosting server sends the website files to the user’s browser.

Example: If we create a website for Aditya Institution, we need web hosting to make it available on the Internet.

2. Types of Web Hosting

There are several types of web hosting.

1. Shared Hosting

Shared hosting means multiple websites use the same physical server and share its resources.

Features:

  • Multiple websites share one server.
  • Low-cost hosting.
  • Easy to manage.
  • Suitable for small websites.

Advantages:

  • Very affordable.
  • Easy to set up.
  • No advanced technical knowledge required.

Disadvantages:

  • Limited resources.
  • Performance may be affected by other websites.
  • Less control over server settings.

Example: Small business websites and personal blogs.

2. VPS Hosting (Virtual Private Server)

VPS hosting divides one physical server into multiple virtual servers.

Each virtual server has its own allocated resources.

Features:

  • Dedicated virtual resources.
  • More control over server settings.
  • Better performance than basic shared hosting.
  • Supports custom software installation.

Advantages:

  • Better performance.
  • More control.
  • Better isolation from other users.

Disadvantages:

  • More expensive than shared hosting.
  • Requires technical knowledge.
  • Resources are still limited by the physical server.

Example: Medium-sized business websites and web applications.

3. Dedicated Hosting

Dedicated hosting means one complete physical server is provided to a single customer.

Features:

  • Complete server control.
  • Dedicated resources.
  • High performance.
  • Custom server configuration.

Advantages:

  • Excellent performance.
  • High level of control.
  • Better resource availability.
  • Suitable for large websites.

Disadvantages:

  • Very expensive.
  • Requires technical knowledge.
  • Server maintenance may be the customer’s responsibility.

Example: Large e-commerce websites and enterprise applications.

4. Cloud Hosting

Cloud hosting uses multiple connected servers to host websites and applications.

Features:

  • Uses multiple servers.
  • Resources can be increased when required.
  • Supports high traffic.
  • Often offers flexible pricing.

Advantages:

  • High availability.
  • Easy scalability.
  • Good performance.
  • Reduced dependence on a single physical server.

Disadvantages:

  • Costs may increase with usage.
  • Requires technical knowledge for advanced setup.
  • Depends on the cloud provider.

Example: Large online applications and shopping websites.

5. Reseller Hosting

Reseller hosting allows a person or company to purchase hosting resources and sell them to other customers.

Features:

  • Hosting resources can be divided among customers.
  • Suitable for hosting businesses.
  • Allows management of multiple websites.

Advantages:

  • Opportunity to start a hosting business.
  • No need to own physical servers.
  • Can generate income.

Disadvantages:

  • Depends on the main hosting provider.
  • Limited server control.
  • Customer support responsibilities.

Example: A web development company providing hosting to its clients.

3. Comparison of Different Web Hosting Types

Hosting TypeCostPerformanceBest For
SharedLowBasicSmall websites
VPSMediumGoodGrowing websites
DedicatedHighVery highLarge websites
CloudVariableScalableHigh-traffic websites
ResellerVariableDepends on providerHosting businesses

Conclusion: Web hosting makes websites accessible on the Internet. The hosting type should be selected according to website size, traffic, budget, and requirements.

Q3. Explain the concept of web publishing. Describe the steps involved in publishing a website on the Internet.

1. Definition of Web Publishing

Web publishing is the process of creating, uploading, and making website content available on the Internet.

It includes designing web pages, purchasing a domain name, selecting web hosting, uploading website files, and testing the website.

Example: Creating a website for Aditya Institution and making it available at www.adityakumarsingh.co.in is an example of web publishing.

2. Steps Involved in Web Publishing

Step 1: Website Planning

  • Decide the purpose of the website.
  • Identify the target audience.
  • Decide what information will be displayed.
  • Prepare a list of required pages.

Example: Home, About Us, Courses, Services, and Contact Us.

Step 2: Website Designing

  • Create the layout of the website.
  • Select colours and fonts.
  • Design menus, buttons, and images.
  • Make the website user-friendly.

Step 3: Website Development

  • Write HTML for webpage structure.
  • Use CSS for designing.
  • Use JavaScript for interactive features.
  • Use PHP or other server-side languages if required.
  • Connect the website to a database if necessary.

Step 4: Register a Domain Name

A domain name is the address of a website on the Internet.

Examples:

  • google.com
  • amazon.in
  • adityakumarsingh.co.in

A domain name must be registered through a domain registrar.

Step 5: Purchase Web Hosting

  • Select a suitable hosting provider.
  • Purchase a hosting plan.
  • Get access to the hosting control panel.
  • Configure the hosting account.

Step 6: Upload Website Files

  • Connect to the hosting server.
  • Upload website files using cPanel File Manager or FTP.
  • Place the files in the correct website directory.
  • Configure database settings if required.

Step 7: Configure DNS

  • Connect the domain name to the hosting server.
  • Update the required DNS records.
  • Wait for DNS changes to become available.

Step 8: Test the Website

  • Check all web pages.
  • Test links and navigation.
  • Check forms and buttons.
  • Test on mobile and desktop devices.
  • Check website loading speed.

Step 9: Publish the Website

After successful testing, the website becomes available to Internet users through its domain name.

Step 10: Website Maintenance

  • Update website content.
  • Fix errors.
  • Install security updates.
  • Take regular backups.
  • Improve website performance.

3. Web Publishing Process Diagram

4. Requirements for Web Publishing

  1. Computer or laptop.
  2. Internet connection.
  3. Domain name.
  4. Web hosting.
  5. Website files.
  6. Web browser.
  7. FTP software or hosting control panel.

Conclusion: Web publishing is the process of making a website available to people worldwide through the Internet.

Q4. Explain the World Wide Web in detail. Discuss its working, important components, web browsers, web servers, websites, and web pages with suitable examples.

1. Definition of World Wide Web

WWW stands for World Wide Web.

The World Wide Web is a collection of interconnected web pages and websites that can be accessed through the Internet using web browsers.

It provides information in the form of text, images, audio, video, and other multimedia content.

Examples: Google, Wikipedia, Amazon, and YouTube.

Important: The Internet and WWW are not the same. The Internet is a worldwide network of connected computers, while the WWW is a service that operates over the Internet.

2. Working of the World Wide Web

The WWW works on a client-server model.

  1. The user opens a web browser.
  2. The user enters a website URL.
  3. DNS finds the IP address of the web server.
  4. The browser sends an HTTP or HTTPS request.
  5. The web server receives the request.
  6. The server sends the requested web page.
  7. The browser displays the web page.

3. Important Components of WWW

1. Web Browser

A web browser is software used to access and display web pages.

Examples:

  • Google Chrome.
  • Mozilla Firefox.
  • Microsoft Edge.
  • Apple Safari.

2. Web Server

A web server is a computer or software that stores, processes, and delivers website content to users.

Examples:

  • Apache HTTP Server.
  • Nginx.
  • Microsoft IIS.

3. Website

A website is a collection of related web pages available under a common domain name.

Examples:

  • www.google.com
  • www.wikipedia.org
  • www.amazon.in

4. Web Page

A web page is a single document available on the World Wide Web.

It may contain text, images, videos, links, and other information.

Examples:

  • Home page.
  • About Us page.
  • Contact Us page.

5. HTML

HTML stands for HyperText Markup Language.

It is used to create the structure of web pages.

6. HTTP/HTTPS

HTTP and HTTPS are communication protocols used to transfer information between browsers and web servers.

7. URL

URL stands for Uniform Resource Locator.

It is the address used to access a web page or Internet resource.

8. Hyperlinks

Hyperlinks are clickable text or images that connect one web page to another.

4. Difference Between Website and Web Page

WebsiteWeb Page
Collection of related web pagesSingle document
Contains multiple pagesContains specific information
Has a domain nameHas its own URL
Example: Amazon websiteExample: Amazon product page

5. Applications of WWW

  • Online education.
  • Online shopping.
  • Social networking.
  • Online banking.
  • News and information.
  • Entertainment.
  • Business promotion.
  • Online communication.

Conclusion: The World Wide Web makes it easy to access and share information through websites and web pages using the Internet.

Q5. Differentiate between static and dynamic websites. Explain their working, characteristics, advantages, disadvantages, and applications with suitable examples.

1. Static Website

A static website is a website in which web pages display fixed content to users.

The content usually remains the same unless a developer manually changes the website files.

Technologies Used:

  • HTML
  • CSS
  • JavaScript

Example: A simple personal portfolio website containing About, Services, and Contact pages.

Working of a Static Website

  1. The user enters the website address.
  2. The browser sends a request to the web server.
  3. The server finds the requested HTML file.
  4. The server sends the file to the browser.
  5. The browser displays the web page.

Characteristics of Static Websites

  • Fixed content.
  • Simple structure.
  • Fast loading.
  • Usually does not require a database.
  • Easy to develop.
  • Changes require editing website files.

Advantages

  • Low development cost.
  • Fast loading speed.
  • Easy hosting.
  • Simple maintenance.
  • Fewer server-side security risks.

Disadvantages

  • Content is not automatically updated.
  • Limited user interaction.
  • Difficult to manage many pages.
  • Changes may require technical knowledge.

Applications

  • Personal portfolio websites.
  • Small business websites.
  • Company information websites.
  • Simple landing pages.
  • Digital brochures.

2. Dynamic Website

A dynamic website is a website in which content can change according to user input, database information, or other conditions.

It uses server-side programming and may use a database to store and retrieve information.

Technologies Used:

  • PHP
  • Python
  • JavaScript
  • ASP.NET
  • MySQL
  • HTML and CSS

Example: Facebook, Amazon, and online banking websites.

Working of a Dynamic Website

  1. The user opens a website.
  2. The browser sends a request to the web server.
  3. The server-side program processes the request.
  4. The program retrieves or updates information from the database if required.
  5. The server generates the required web page.
  6. The browser displays the result.

Characteristics of Dynamic Websites

  • Content can change automatically.
  • Supports user accounts.
  • Can connect to databases.
  • Provides interactive features.
  • Supports online transactions.
  • Content can be managed through an admin panel.

Advantages

  • Highly interactive.
  • Easy content management.
  • Supports multiple users.
  • Provides personalized information.
  • Suitable for large applications.

Disadvantages

  • More expensive to develop.
  • Requires server-side programming.
  • May require database management.
  • Needs regular security maintenance.
  • Performance depends on server processing.

Applications

  • E-commerce websites.
  • Social networking websites.
  • Online banking systems.
  • Educational portals.
  • News portals.
  • Content management systems.

3. Difference Between Static and Dynamic Websites

BasisStatic WebsiteDynamic Website
ContentFixedChanges according to data or user input
DevelopmentSimpleMore complex
DatabaseUsually not requiredOften required
SpeedGenerally fasterDepends on processing
InteractionLimitedHigh
UpdatingManual file editingCan be automated
CostUsually lowUsually higher
TechnologyHTML, CSS, JSPHP, Python, JS, databases
ExamplePortfolio websiteAmazon

4. Examples of Static and Dynamic Websites

Static Website

Fixed information and simple pages.

Dynamic Website

Products, accounts, search, and shopping cart.

Conclusion: Static websites are suitable for simple information-based websites, while dynamic websites are suitable for interactive applications that require databases and user management.

Q6. Explain the different phases of website development in detail, including planning, designing, development, testing, publishing, and maintenance.

1. Introduction

Website development is the process of creating, designing, building, testing, and maintaining a website.

It involves several steps to make a website useful, attractive, secure, and user-friendly.

2. Different Phases of Website Development

Phase 1: Planning

Planning is the first phase of website development.

In this phase, we decide what type of website we want to create and what purpose it will serve.

Activities:

  • Decide the purpose of the website.
  • Identify the target audience.
  • Collect required information.
  • Decide the website structure.
  • Select the technologies.
  • Estimate the budget and time.

Example: Planning a website for Aditya Institution with Home, About, Courses, and Contact pages.

Phase 2: Website Designing

In this phase, the appearance and layout of the website are created.

Activities:

  • Select colours and fonts.
  • Design the homepage.
  • Create menus and navigation.
  • Arrange images and text.
  • Prepare page layouts.
  • Design mobile-friendly interfaces.

Technologies:

  • Figma.
  • Adobe Photoshop.
  • HTML.
  • CSS.
  • Bootstrap.

Phase 3: Website Development

In this phase, the actual website is created using programming languages and tools.

Activities:

  • Create web pages using HTML.
  • Apply styling using CSS.
  • Add interactive features using JavaScript.
  • Develop server-side functionality.
  • Connect the database if required.
  • Create login and registration systems if needed.

Technologies:

  • HTML
  • CSS
  • JavaScript
  • PHP
  • Python
  • MySQL
  • Bootstrap

Phase 4: Website Testing

Testing is performed to find and correct errors before publishing the website.

Activities:

  • Check all web pages.
  • Test links and buttons.
  • Check forms.
  • Test website on different browsers.
  • Test mobile responsiveness.
  • Check website loading speed.
  • Check basic security.

Example: Checking whether the Contact Us form correctly sends user information.

Phase 5: Website Publishing

Publishing means making the website available on the Internet.

Activities:

  • Register a domain name.
  • Purchase web hosting.
  • Upload website files.
  • Configure DNS settings.
  • Install an SSL certificate.
  • Test the live website.

Example: Publishing a website at www.adityakumarsingh.co.in.

Phase 6: Website Maintenance

Website maintenance means regularly updating and improving the website after publishing.

Activities:

  • Update website content.
  • Fix errors and bugs.
  • Take regular backups.
  • Update software and plugins.
  • Improve website security.
  • Monitor website performance.
  • Add new features when required.

Example: Adding new courses and updating contact details on an institution’s website.

3. Website Development Life Cycle Diagram

4. Importance of Website Development Phases

  • Helps complete projects systematically.
  • Reduces development errors.
  • Saves time and cost.
  • Improves website quality.
  • Provides better user experience.
  • Makes website maintenance easier.

Conclusion: Website development involves planning, designing, development, testing, publishing, and maintenance. Following these phases helps create a successful and reliable website.

Quick Revision – Important Full Forms

Short FormFull Form
HTMLHyperText Markup Language
CSSCascading Style Sheets
PHPPHP: Hypertext Preprocessor
WWWWorld Wide Web
URLUniform Resource Locator
HTTPHyperText Transfer Protocol
HTTPSHyperText Transfer Protocol Secure
FTPFile Transfer Protocol
SQLStructured Query Language
UIUser Interface
UXUser Experience
DNSDomain Name System
ISPInternet Service Provider
VPSVirtual Private Server
SSLSecure Sockets Layer

Important Questions for Exam Revision

QuestionMain Topics to Remember
Q1Client-side vs Server-side scripting
Q2Shared, VPS, Dedicated, Cloud, Reseller Hosting
Q3Steps of Web Publishing
Q4WWW, Browser, Server, Website, Web Page
Q5Static vs Dynamic Websites
Q6Website Development Life Cycle

Study Tip: Give special attention to the differences between client-side and server-side scripting, static and dynamic websites, and the types of web hosting. Practise the diagrams of website publishing, WWW working, and the website development life cycle for better examination preparation.

Internet and Web Technology – Important Questions & Answers UNIT 1

Q1. Define the Internet. Explain its working, major components, and various Internet services with suitable examples.

1. Definition of Internet

The Internet is a worldwide network of interconnected computers and devices that communicate with each other to share information and resources.

It allows people to send emails, browse websites, watch videos, download files, attend online classes, and communicate with others.

Example: Google, YouTube, Facebook, WhatsApp, and Gmail are services that use the Internet.

2. Working of the Internet

The Internet works by connecting millions of computers and devices through wired and wireless networks.

The basic working process is:

  1. A user connects a computer or mobile phone to the Internet.
  2. The user opens a web browser, such as Google Chrome.
  3. The user enters a website address, such as www.google.com.
  4. DNS converts the website name into an IP address.
  5. The browser sends a request to the web server.
  6. The web server processes the request and sends the required information.
  7. The browser displays the website on the user’s screen.

3. Major Components of the Internet

  1. Client: A computer or mobile device that requests information.
  2. Server: A computer that stores and provides information or services.
  3. Router: A device that connects different networks and forwards data.
  4. Modem: A device that connects a network to an Internet service.
  5. ISP (Internet Service Provider): A company that provides Internet connections, such as Jio, Airtel, and BSNL.
  6. IP Address: A unique numerical address used to identify a device on a network.
  7. Protocols: Rules that allow devices to communicate, such as HTTP, HTTPS, TCP/IP, and FTP.

4. Various Internet Services

Internet ServiceDescriptionExample
E-mailSending and receiving messagesGmail
WWWAccessing websites and web pagesGoogle
File TransferUploading and downloading filesFTP
Video ConferencingOnline meetings and video callsGoogle Meet
Social NetworkingConnecting with peopleFacebook
E-commerceBuying and selling products onlineAmazon
Online BankingManaging bank accounts onlineSBI Online
Online EducationLearning through the InternetYouTube, Google Classroom
Instant MessagingSending messages instantlyWhatsApp
Cloud StorageStoring files onlineGoogle Drive

Conclusion: The Internet is an important technology that connects people worldwide and provides many services for communication, education, business, and entertainment.

Q2. What is DNS? Explain the working of the Domain Name System with a suitable diagram. Also describe the role of DNS servers in accessing websites.

1. Definition of DNS

DNS stands for Domain Name System.

It is a system that converts human-readable website names into IP addresses that computers can understand.

For example:

  • Website name: www.google.com
  • IP address: An address such as 142.250.183.14 (example)

We remember website names easily, but computers use IP addresses to communicate with servers.

Therefore, DNS is also called the Phonebook of the Internet.

2. Working of DNS

When a user enters a website address in a browser, DNS performs the following steps:

  1. The user enters www.google.com in the browser.
  2. The browser checks its DNS cache for the IP address.
  3. If the address is not found, the computer asks a DNS resolver.
  4. The DNS resolver contacts other DNS servers if necessary.
  5. The DNS server finds the IP address of the website.
  6. The IP address is returned to the user’s computer.
  7. The browser connects to the web server and displays the website.

3. DNS Working Diagram

4. Types of DNS Servers

1. DNS Resolver

  • Receives DNS requests from users.
  • Finds the IP address of the requested website.
  • It may contact other DNS servers.

2. Root DNS Server

  • It is the first level of the DNS hierarchy.
  • It directs the resolver to the appropriate Top-Level Domain server.

3. TLD DNS Server

  • TLD stands for Top-Level Domain.
  • It handles domain extensions such as .com, .org, .in, and .edu.
  • It directs the resolver to the authoritative DNS server.

4. Authoritative DNS Server

  • It stores the actual DNS records for a domain.
  • It provides the correct IP address of the requested website.

5. Role of DNS Servers

  • Convert domain names into IP addresses.
  • Help browsers locate websites.
  • Reduce the need to remember numerical IP addresses.
  • Store DNS records.
  • Improve website accessibility and communication.

Example: When we type www.youtube.com, DNS finds the IP address of YouTube so that our browser can connect to its server.

Conclusion: DNS makes Internet browsing easier by converting website names into IP addresses.

Q3. What is a web browser? Explain the working of a web browser and discuss the features of any four popular web browsers.

1. Definition of Web Browser

A web browser is a software application used to access, retrieve, and display information from websites on the Internet.

It helps users open web pages, watch videos, download files, and search for information.

Examples: Google Chrome, Mozilla Firefox, Microsoft Edge, and Apple Safari.

2. Working of a Web Browser

A web browser works in the following steps:

  1. The user opens a web browser.
  2. The user enters a website URL in the address bar.
  3. The browser uses DNS to find the IP address of the website.
  4. The browser sends an HTTP or HTTPS request to the web server.
  5. The web server sends the requested web page data.
  6. The browser processes HTML, CSS, and JavaScript.
  7. Finally, the browser displays the web page on the screen.

3. Features of Four Popular Web Browsers

1. Google Chrome

  • Developed by Google.
  • Fast browsing speed.
  • Supports extensions and add-ons.
  • Provides incognito mode.
  • Supports synchronization with Google accounts.

2. Mozilla Firefox

  • Developed by Mozilla.
  • Provides strong privacy protection.
  • Supports extensions.
  • Includes private browsing mode.
  • Offers tracking protection.

3. Microsoft Edge

  • Developed by Microsoft.
  • Based on Chromium.
  • Provides fast browsing.
  • Includes reading mode and tracking prevention.
  • Integrates with Windows services.

4. Apple Safari

  • Developed by Apple.
  • Mainly used on Apple devices.
  • Provides good performance.
  • Includes privacy protection.
  • Supports synchronization through iCloud.

4. Common Features of Web Browsers

  • Address bar
  • Back and forward buttons
  • Refresh button
  • Bookmarks
  • Download manager
  • Browsing history
  • Private browsing
  • Tabbed browsing

Conclusion: A web browser is an essential software application that helps users access websites and Internet resources easily.

Q4. Define a search engine. Explain its working and classify search engines into different categories with suitable examples.

1. Definition of Search Engine

A search engine is an online software system that helps users find information on the Internet by entering keywords or phrases.

It searches its database and displays a list of relevant websites.

Examples: Google, Bing, Yahoo, and DuckDuckGo.

2. Working of a Search Engine

A search engine mainly works through three processes:

1. Crawling

  • Search engines use automated programs called crawlers or spiders.
  • These programs visit websites and collect information.
  • They follow links from one page to another.

2. Indexing

  • The collected information is stored in a large database.
  • Search engines organize information according to keywords and topics.
  • This process is called indexing.

3. Ranking

  • When a user searches for something, the search engine checks its index.
  • It selects relevant web pages.
  • It displays the most useful results according to its ranking system.

Example: If a user searches for “Best computer courses”, Google displays websites related to computer courses.

3. Categories of Search Engines

Search engines can be classified into the following categories:

1. Crawler-Based Search Engines

  • These search engines use automated programs called spiders or crawlers.
  • They automatically visit and index web pages.
  • They provide results based on their database.

Examples:

  • Google
  • Bing

2. Human-Powered Directories

  • Websites are submitted and organized by human editors.
  • Editors classify websites into different categories.
  • Results are based on manually organized listings.

Example: Yahoo Directory (historical service, discontinued).

3. Meta Search Engines

  • These search engines collect results from multiple search engines.
  • They do not depend entirely on their own web index.
  • They combine results from different sources.

Examples:

  • Dogpile
  • MetaCrawler

4. Hybrid Search Engines

  • These search engines use a combination of different search methods.
  • They may combine crawler-based results with other sources.

Example: Google and Bing use multiple search technologies and sources.

5. Specialized Search Engines

  • These search engines focus on a particular subject or type of information.
  • They provide more specific search results.

Examples:

  • Google Scholar – Academic research papers.
  • PubMed – Medical research.
  • YouTube – Videos.

4. Advantages of Search Engines

  • Help find information quickly.
  • Save time and effort.
  • Provide information on different topics.
  • Help in education and research.
  • Provide images, videos, news, and maps.

Conclusion: Search engines make it easy to find useful information on the Internet.

Q5. Explain different Internet connection methods. Describe the procedure for configuring an Internet connection and connecting a Local Area Network (LAN) to the Internet.

1. Definition of Internet Connection

An Internet connection is a communication link that allows computers and other devices to access the Internet.

There are different methods of connecting to the Internet.

2. Different Internet Connection Methods

1. Dial-up Connection

  • Uses a telephone line to connect to the Internet.
  • Requires a modem.
  • Provides very slow Internet speed.
  • It is an older technology.

2. DSL Connection

  • DSL stands for Digital Subscriber Line.
  • Uses telephone lines for Internet access.
  • Allows telephone and Internet services to work simultaneously.
  • Provides better speed than dial-up.

3. Cable Internet

  • Uses cable television networks.
  • Provides high-speed Internet access.
  • Commonly used in homes and offices.

4. Fiber Optic Connection

  • Uses optical fiber cables to transmit data using light.
  • Provides very high Internet speed.
  • Offers reliable connectivity.

5. Wi-Fi Connection

  • Provides wireless Internet access.
  • Uses a wireless router.
  • Connects laptops, smartphones, and other devices.

6. Mobile Internet

  • Uses mobile networks such as 4G and 5G.
  • Provides Internet access through smartphones or mobile hotspots.

7. Satellite Internet

  • Uses satellites to provide Internet access.
  • Useful in remote areas where cable or fiber connections are unavailable.

3. Procedure for Configuring an Internet Connection

The following steps are used to configure an Internet connection:

  1. Select an Internet Service Provider (ISP), such as Jio, Airtel, or BSNL.
  2. Choose a suitable Internet plan.
  3. Get the required modem or router.
  4. Connect the modem or router to the Internet service line.
  5. Connect the computer to the router using Wi-Fi or an Ethernet cable.
  6. Configure the router settings if required.
  7. Enter the username and password if the ISP requires them.
  8. Save the settings and restart the router.
  9. Open a web browser and test the Internet connection.

4. Connecting a LAN to the Internet

A LAN (Local Area Network) is a network that connects computers and devices within a small geographical area, such as a home, school, or office.

Steps to connect a LAN to the Internet:

  1. Connect the Internet service line to a modem or ONT.
  2. Connect the modem or ONT to a router.
  3. Connect computers to the router using Ethernet cables or Wi-Fi.
  4. Configure the router to obtain Internet settings from the ISP.
  5. Enable DHCP to assign IP addresses automatically.
  6. Configure DNS settings if necessary.
  7. Test the Internet connection on each computer.

5. LAN to Internet Connection Diagram

Advantages of LAN Internet Connection

  • Multiple computers can share one Internet connection.
  • Files and printers can be shared.
  • Easy communication between computers.
  • Centralized network management.
  • Saves cost.

Conclusion: Different Internet connection methods are available according to speed, cost, and location. A router allows multiple LAN devices to share one Internet connection.

Q6. Explain the client-server environment in detail. Differentiate between single-user, multi-user, server, and workstation environments with suitable examples.

1. Definition of Client-Server Environment

A client-server environment is a network system in which one computer provides services or resources, and other computers request and use those services.

In this environment:

  • Client: A computer or device that requests services.
  • Server: A computer that provides services to clients.

Example: When a user opens a website, the browser acts as a client and the website’s web server provides the requested web page.

2. Working of Client-Server Environment

  1. The client sends a request to the server.
  2. The server receives the request.
  3. The server processes the request.
  4. The server retrieves the required data.
  5. The server sends a response to the client.
  6. The client displays the result.

3. Types of Computing Environments

1. Single-User Environment

  • Only one user can use the computer at a time.
  • Resources are mainly used by one person.
  • It is suitable for personal work.
  • It is generally simple to manage.

Examples:

  • Personal desktop computer.
  • Home laptop.

2. Multi-User Environment

  • Multiple users can access a computer system or its resources.
  • Users can work simultaneously.
  • It requires user accounts and access permissions.
  • It is commonly used in organizations.

Examples:

  • University computer systems.
  • UNIX/Linux multi-user systems.

3. Server Environment

  • A server provides services and resources to other computers.
  • It stores and manages data.
  • It can serve multiple clients at the same time.
  • It provides centralized management and security.

Examples:

  • Web server.
  • Database server.
  • File server.
  • Mail server.

4. Workstation Environment

  • A workstation is a powerful computer designed for professional or technical work.
  • It usually has high processing power and memory.
  • It is used for specialized applications.
  • It is suitable for heavy computing tasks.

Examples:

  • Computer used for 3D designing.
  • Engineering workstation.
  • Video editing computer.

4. Difference Between Single-User, Multi-User, Server, and Workstation

BasisSingle-UserMulti-UserServerWorkstation
MeaningUsed by one userUsed by multiple usersProvides servicesUsed for professional work
UsersOneManyMany clientsUsually one
PurposePersonal workShared computingProviding resourcesTechnical work
PowerNormalDepends on systemUsually highUsually high
ExampleHome PCUNIX systemWeb serverCAD computer

5. Advantages of Client-Server Environment

  • Centralized data management.
  • Easy sharing of resources.
  • Better security and control.
  • Easy backup of data.
  • Supports multiple users.
  • Easy network administration.

Conclusion: The client-server environment is widely used in offices, schools, banks, and organizations to share data and resources efficiently.

Q7. What is HTTP? Explain the working of HTTP communication between a client and a web server. Also explain the role of URLs in accessing Internet resources with suitable examples.

1. Definition of HTTP

HTTP stands for HyperText Transfer Protocol.

It is a communication protocol used to transfer web pages and other resources between a web browser (client) and a web server.

HTTP defines how requests and responses are exchanged over the Internet.

Example: When we open a website, the browser uses HTTP or HTTPS to communicate with the website’s server.

2. What is HTTPS?

HTTPS stands for HyperText Transfer Protocol Secure.

It is the secure version of HTTP.

  • HTTP transfers information without built-in encryption.
  • HTTPS uses TLS encryption to protect data.
  • HTTPS is commonly used for banking, shopping, and login pages.

3. Working of HTTP Communication

HTTP follows a request-response model.

The working process is:

  1. The user enters a website address in the browser.
  2. The browser finds the server’s IP address using DNS.
  3. The browser establishes a connection with the web server.
  4. The browser sends an HTTP request.
  5. The server receives and processes the request.
  6. The server sends an HTTP response.
  7. The browser displays the requested web page.

4. Common HTTP Request Methods

MethodDescriptionExample
GETRetrieves informationOpening a webpage
POSTSends data to the serverSubmitting a registration form
PUTCreates or replaces a resourceUpdating user information
DELETEDeletes a resourceDeleting a record

5. HTTP Status Codes

HTTP status codes tell the browser whether a request was successful or not.

Status CodeMeaning
200OK – Request successful
301Moved Permanently
400Bad Request
401Unauthorized
403Forbidden
404Page Not Found
500Internal Server Error

6. Definition of URL

URL stands for Uniform Resource Locator.

A URL is the address of a resource available on the Internet.

It tells the browser where a resource is located and how to access it.

Example:

7. Main Parts of a URL

Consider the following URL:

https://www.example.com/about.html

https://

Protocol – Defines how to access the resource.

www

Subdomain – A subdivision of a domain.

example.com

Domain name – Identifies the website.

/about.html

Path – Identifies the particular web page or resource.

8. Role of URLs in Accessing Internet Resources

  • URLs provide addresses for websites.
  • They help browsers locate web pages.
  • They identify specific files and resources.
  • They make sharing website links easy.
  • They specify the protocol used to access resources.

Examples of URLs:

  1. https://www.google.com – Google search engine.
  2. https://www.youtube.com – YouTube website.
  3. https://www.wikipedia.org – Online encyclopedia.
  4. https://www.example.com/about.html – A particular web page.

Conclusion: HTTP is used for communication between web browsers and web servers, while URLs provide the addresses required to access Internet resources.

Quick Revision – Important Full Forms

Short FormFull Form
WWWWorld Wide Web
DNSDomain Name System
HTTPHyperText Transfer Protocol
HTTPSHyperText Transfer Protocol Secure
URLUniform Resource Locator
ISPInternet Service Provider
IPInternet Protocol
LANLocal Area Network
FTPFile Transfer Protocol
TCPTransmission Control Protocol
DHCPDynamic Host Configuration Protocol
DSLDigital Subscriber Line
TLDTop-Level Domain
HTMLHyperText Markup Language
CSSCascading Style Sheets

Important Points to Remember for Exams

  1. Internet: A worldwide network of interconnected computers.
  2. DNS: Converts domain names into IP addresses.
  3. Web Browser: Software used to access websites.
  4. Search Engine: A tool used to find information on the Internet.
  5. ISP: A company that provides Internet services.
  6. LAN: A network connecting devices within a small geographical area.
  7. Client: Requests services from a server.
  8. Server: Provides services to clients.
  9. HTTP: Protocol used for communication between browsers and web servers.
  10. URL: Address of an Internet resource.

Study Tip: For examination preparation, learn the definitions, working steps, advantages, examples, and diagrams of each topic. Practise the DNS, Internet working, client-server, and HTTP diagrams because they make long answers easier to understand and present.