Skip to main content

Chapter 1

Web Technology I

TU BIM past exam questions

Past questions and answers

22 questions set from this chapter. Most repeated first.

  • 2023 AD Model · 1 mark

What is DNS?

Answer

DNS (Domain Name System) is a distributed naming service that translates human-readable domain names such as www.example.com into numeric IP addresses such as 93.184.216.34, so that browsers can locate web servers.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

What is dynamic web page?

Answer

A dynamic web page is a page whose content is generated at the time of request, usually by server-side scripts (PHP, ASP.NET, Node.js) or client-side scripts working with a database, so the same URL can show different content to different users or at different times. Examples are social media feeds and online shopping carts.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

What is the use of <iframe> tag in HTML?

Answer

The <iframe> tag embeds another HTML document (or external page, video, map) inside the current page in an inline frame, for example <iframe src="https://example.com" width="400" height="300"></iframe>.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

What do you mean by HTML events?

Answer

HTML events are actions or occurrences, such as a mouse click, key press, page load or form submission, that the browser detects on HTML elements. JavaScript can respond to them through event attributes or listeners, e.g. <button onclick="show()">Click</button>.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

Why is the use of CSS?

Answer

CSS (Cascading Style Sheets) separates presentation from content. It controls the layout, colours, fonts and spacing of many pages from one style sheet, which makes pages consistent, easier to maintain and faster to load.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

Define responsive web design.

Answer

Responsive web design is an approach in which a web page adapts its layout and content to the screen size and device (mobile, tablet, desktop) using flexible grids, flexible images and CSS media queries.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

Define cookies.

Answer

Cookies are small text files, stored in the user's browser by a website, that hold data such as login state, preferences or session identifiers. The browser sends them back to the server with later requests.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

Why do we need AJAX?

Answer

AJAX (Asynchronous JavaScript and XML) lets a page exchange data with the server in the background and update only part of the page without reloading it. This gives faster, smoother and more interactive applications and reduces bandwidth use, e.g. live search suggestions and form validation.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

What is jQuery?

Answer

jQuery is a fast, lightweight JavaScript library that simplifies DOM selection and manipulation, event handling, animation and AJAX with short syntax, e.g. $("#id").hide();. It also hides many browser differences.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 1 mark

What is XML DTD?

Answer

A DTD (Document Type Definition) defines the structure and legal elements and attributes of an XML document. It is used to check that the XML is valid, e.g. <!ELEMENT note (to, from, body)>.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 3 marks

Explain HTTP request message in brief.

Answer

An HTTP request message is sent by a client (browser) to a server to ask for a resource. It has four parts.

  • Request line: method, URL and HTTP version, e.g. GET /index.html HTTP/1.1. Common methods are GET, POST, PUT and DELETE.
  • Headers: name-value pairs giving extra information, e.g. Host: www.example.com, User-Agent, Accept, Cookie.
  • Blank line: marks the end of the headers.
  • Body (optional): data sent to the server, such as submitted form data in a POST request.

Example:

POST /login HTTP/1.1
Host: www.example.com
Content-Type: application/x-www-form-urlencoded

user=ram&pass=1234

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 3 marks

Explain structure of an HTML file with example.

Answer

An HTML file is made of nested elements in a fixed structure:

  • <!DOCTYPE html> declares the document as HTML5.
  • <html> is the root element that contains everything.
  • <head> holds information not shown on the page: <title>, <meta>, <link> and <style>/<script>.
  • <body> holds the visible content: headings, paragraphs, images, links, tables and forms.
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>My First Page</title>
</head>
<body>
  <h1>Welcome</h1>
  <p>This is a paragraph.</p>
</body>
</html>

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 3 marks

How do you insert external style sheet in an HTML page?

Answer

An external style sheet is written in a separate .css file and linked to the page with the <link> tag inside <head>.

style.css:

body { background-color: lightblue; }
h1 { color: navy; }

HTML page:

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

One CSS file can then style many pages, so changing it changes the look of the whole site.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 3 marks

How do you handle errors in JavaScript?

Answer

JavaScript handles runtime errors with try...catch...finally.

  • try contains the code that may cause an error.
  • catch(e) runs if an error occurs; e holds the error object.
  • finally always runs afterwards.
  • throw creates a custom error.
try {
  let x = parseInt(prompt("Enter a number"));
  if (isNaN(x)) throw "Not a number";
  alert(10 / x);
} catch (e) {
  alert("Error: " + e);
} finally {
  console.log("Done");
}

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 3 marks

Explain structure of a JSON file? How do you convert a JSON file into JavaScript object?

Answer

Structure of JSON. JSON (JavaScript Object Notation) is a text format for data. It is built from:

  • Objects in { } holding comma-separated "key": value pairs (keys are strings in double quotes).
  • Arrays in [ ] holding ordered lists of values.
  • Values: string, number, boolean, null, object or array.
{
  "name": "Sita",
  "age": 20,
  "isStudent": true,
  "subjects": ["Web", "Accounting"]
}

Converting JSON to a JavaScript object. Use JSON.parse() on the JSON text (the reverse is JSON.stringify()):

var text = '{"name":"Sita","age":20}';
var obj = JSON.parse(text);
console.log(obj.name);   // Sita

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 3 marks

Explain structure of XML file with example.

Answer

XML (eXtensible Markup Language) stores and transports data using user-defined tags. An XML file has:

  • An optional prolog: <?xml version="1.0" encoding="UTF-8"?>.
  • Exactly one root element that contains all the others.
  • Child elements nested properly, each with a start and end tag.
  • Optional attributes in the start tag, with quoted values.
  • Case-sensitive names, and every tag must be closed.
<?xml version="1.0" encoding="UTF-8"?>
<students>
  <student id="1">
    <name>Ram</name>
    <age>20</age>
  </student>
  <student id="2">
    <name>Sita</name>
    <age>21</age>
  </student>
</students>

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 5 marks

Design an HTML form to provide user input for Name, Address, and Gender. The form should also contain submit button for submitting the form data.

Answer

<!DOCTYPE html>
<html>
<head>
  <title>User Form</title>
</head>
<body>
  <h2>User Information</h2>
  <form action="submit.php" method="post">
    <label for="name">Name:</label>
    <input type="text" id="name" name="name" required><br><br>

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

    Gender:
    <input type="radio" id="m" name="gender" value="Male"> <label for="m">Male</label>
    <input type="radio" id="f" name="gender" value="Female"> <label for="f">Female</label>
    <input type="radio" id="o" name="gender" value="Other"> <label for="o">Other</label><br><br>

    <input type="submit" value="Submit">
  </form>
</body>
</html>

The <form> tag groups the inputs; action gives the page that receives the data and method the way it is sent. The text box takes the name, the textarea the address, radio buttons with the same name allow one gender choice, and the submit button sends the form data.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 5 marks

What is CSS box model? Create a box model that wraps around <div> tag with margins, borders, padding, and actual content.

Answer

CSS box model. Every HTML element is treated as a rectangular box made of four layers, from inside to outside:

  1. Content: the text or image itself (width and height).
  2. Padding: transparent space between the content and the border.
  3. Border: a line around the padding.
  4. Margin: transparent space outside the border, separating the element from others.

Total width = content width + left/right padding + left/right border + left/right margin.

<!DOCTYPE html>
<html>
<head>
<style>
  div {
    width: 300px;
    padding: 20px;
    border: 5px solid blue;
    margin: 30px;
    background-color: lightyellow;
  }
</style>
</head>
<body>
  <div>This is the actual content of the box model.</div>
</body>
</html>

Here the total width is 300+2(20)+2(5)+2(30)=410300 + 2(20) + 2(5) + 2(30) = 410 px.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 5 marks

Explain XML schema with example. What is DTD?

Answer

XML Schema (XSD). XML Schema Definition describes the structure of an XML document: which elements and attributes are allowed, their data types, order, and how many times they may occur. It is itself written in XML and is more powerful than a DTD because it supports data types (string, integer, date), namespaces and restrictions.

XML document:

<?xml version="1.0"?>
<student>
  <name>Ram</name>
  <age>20</age>
</student>

Schema (student.xsd):

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="student">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="name" type="xs:string"/>
        <xs:element name="age" type="xs:integer"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

An XML file that follows the schema is called valid.

DTD. A Document Type Definition defines the legal building blocks of an XML document: the elements, their order and nesting, and attributes. It can be internal (inside the XML file) or external. It has no data types and is not written in XML syntax.

<!DOCTYPE student [
  <!ELEMENT student (name, age)>
  <!ELEMENT name (#PCDATA)>
  <!ELEMENT age (#PCDATA)>
]>

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 10 marks

Explain different ways of inserting CSS in an HTML document? What is pseudo-class selector?

Answer

Ways of inserting CSS. There are three ways.

1. Inline CSS. The style attribute is written inside a single HTML element. It affects only that element and has the highest priority, but it mixes content with style and is hard to maintain.

<p style="color:red; font-size:18px;">Inline styled text</p>

2. Internal (embedded) CSS. Rules are written in a <style> tag inside <head>. They apply to the whole page but only that page.

<head>
  <style>
    body { background-color: #f0f0f0; }
    h1 { color: green; }
  </style>
</head>

3. External CSS. Rules are written in a separate .css file and linked with <link> in <head>. One file can style the whole website, which makes it the best method for maintenance and reuse.

<link rel="stylesheet" href="style.css">

When rules conflict, inline overrides internal and external; internal and external follow the order in which they are written (the later wins).

Pseudo-class selector. A pseudo-class selects an element in a particular state or position. It is written as the selector followed by a colon and the pseudo-class name.

Common pseudo-classes: :hover (mouse over), :active (being clicked), :focus (has keyboard focus), :visited and :link (links), :first-child, :last-child, :nth-child(n).

a:link    { color: blue; }
a:visited { color: purple; }
a:hover   { color: red; text-decoration: underline; }
input:focus { background-color: yellow; }
li:first-child { font-weight: bold; }

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2023 AD Model · 10 marks

Create an HTML form with fields username, password, and country. The username field should be textbox type, password field should be password type, and the country should be a drop-down list. Now write a JavaScript function to validate this form. The function should validate the username to be of length 8, password should start with digit and should be alphanumeric, and the country field should be selected.

Answer

<!DOCTYPE html>
<html>
<head>
  <title>Form Validation</title>
  <script>
    function validateForm() {
      var username = document.getElementById("username").value;
      var password = document.getElementById("password").value;
      var country  = document.getElementById("country").value;

      // username must be exactly 8 characters
      if (username.length !== 8) {
        alert("Username must be exactly 8 characters long.");
        return false;
      }

      // password must start with a digit and be alphanumeric
      var pattern = /^[0-9][A-Za-z0-9]*$/;
      if (!pattern.test(password)) {
        alert("Password must start with a digit and contain only letters and digits.");
        return false;
      }

      // country must be selected
      if (country === "") {
        alert("Please select a country.");
        return false;
      }

      alert("Form validated successfully.");
      return true;
    }
  </script>
</head>
<body>
  <h2>Registration</h2>
  <form onsubmit="return validateForm()">
    Username:
    <input type="text" id="username" name="username"><br><br>

    Password:
    <input type="password" id="password" name="password"><br><br>

    Country:
    <select id="country" name="country">
      <option value="">--Select Country--</option>
      <option value="Nepal">Nepal</option>
      <option value="India">India</option>
      <option value="China">China</option>
      <option value="Other">Other</option>
    </select><br><br>

    <input type="submit" value="Submit">
  </form>
</body>
</html>

The form uses a text box, a password box and a drop-down list. On submit, validateForm() runs. It checks username.length, tests the password against the regular expression ^[0-9][A-Za-z0-9]*$ (first character a digit, the rest letters or digits) and checks that the country still has the empty default value. Returning false stops the form from being submitted.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from TU BIM Third Semester Model Questions 2023 (IT 237, ACC 201, IT 236, STT 201, IT 238) (Faculty of Management model question set 2023, BIM third semester (new course)), TU BIM Third Semester Model Question 2023 ACC 201 Financial Accounting (Faculty of Management model question 2023), TU BIM Third Semester Model Question 2023 IT 236 Microprocessor and Computer Architecture (Faculty of Management model question 2023), TU BIM Third Semester Model Question 2023 STT 201 Business Statistics (Faculty of Management model question 2023), TU BIM Third Semester Model Question 2023 IT 238 Data Structure and Algorithms (Faculty of Management model question 2023), TU BIM Third Semester Model Question 2023 STT 201 Business Statistics (Lab) (Faculty of Management model question 2023, MS-Excel practical), TU BIM 2014 Third Semester IT 215 Web Programming I (model question) (Faculty of Management model question 2014 (old course), via EducateNepal), TU BIM 2014 Third Semester IT 216 Java Programming I (model question) (Faculty of Management model question 2014 (old course), via EducateNepal), TU BIM 2014 Third Semester IT 217 Computer Organization (model question) (Faculty of Management model question 2014 (old course), via EducateNepal), TU BBA/BIM/BBM 2015 Third Semester STT 201 Business Statistics (model question) (Faculty of Management model question 2015 (old course), via EducateNepal), TU BBA/BIM/BBM 2015 Third Semester STT 201 Business Statistics Lab (model question) (Faculty of Management model question 2015, lab work using MS-Excel), TU BIM Computer Organization (IT 217) 2012 AD (Board exam paper, 2012 AD), TU BIM Computer Organization (IT 217) 2014 AD (Board exam paper, 2014 AD), TU BIM Computer Organization (IT 217) 2015 AD (Board exam paper, 2015 AD), TU BIM Computer Organization (IT 217) 2016 AD (Board exam paper, 2016 AD), TU BIM Computer Organization (IT 217) 2017 AD (Board exam paper, 2017 AD), TU BIM Computer Organization (IT 217) 2018 AD (Board exam paper, 2018 AD), TU BIM Computer Organization (IT 217) 2019 AD (Board exam paper, 2019 AD), TU BIM Computer Organization (IT 217) 2021 AD (Board exam paper, 2021 AD), TU BIM Web Programming I (IT 215) 2014 AD (Board exam paper, 2014 AD), TU BIM Web Programming I (IT 215) 2015 AD (Board exam paper, 2015 AD), TU BIM Web Programming I (IT 215) 2016 AD (Board exam paper, 2016 AD), TU BIM Web Programming I (IT 215) 2017 AD (Board exam paper, 2017 AD), TU BIM Web Programming I (IT 215) 2018 AD (Board exam paper, 2018 AD), TU BIM Web Programming I (IT 215) 2019 AD (Board exam paper, 2019 AD), TU BIM Web Programming I (IT 215) 2021 AD (Board exam paper, 2021 AD), TU BIM Java Programming I (IT 216) 2015 AD (Board exam paper, 2015 AD), TU BIM Java Programming I (IT 216) 2017 AD (Board exam paper, 2017 AD), TU BIM Java Programming I (IT 216) 2018 AD (Board exam paper, 2018 AD), TU BIM Java Programming I (IT 216) 2019 AD (Board exam paper, 2019 AD), TU BIM Java Programming I (IT 216) 2021 AD (Board exam paper, 2021 AD), TU BIM Business Statistics (STT 201) 2009 AD (Board exam paper, 2009 AD), TU BIM Business Statistics (STT 201) 2010 AD (Board exam paper, 2010 AD), TU BIM Business Statistics (STT 201) 2021 AD (Board exam paper, January 2021 (Full Marks 36, answer any six)), TU BIM Business Statistics (STT 201) 2013 AD (Board exam paper, 2013 (Full Marks 36)), TU BIM Business Statistics (STT 201) 2014 AD (Board exam paper, 2014 AD), TU BIM Business Statistics (STT 201) 2015 AD (Board exam paper, 2015 AD), TU BIM Business Statistics (STT 201) 2016 AD (Board exam paper, 2016 AD), TU BIM Business Statistics (STT 201) 2018 AD (Board exam paper, 2018 AD), TU BIM Business Statistics (STT 201) 2019 AD (Board exam paper, 2019 AD), TU BIM Financial Accounting (ACC 201) 2015 AD (Board exam paper, 2015 AD), TU BIM Financial Accounting (ACC 201) 2016 AD (Board exam paper, 2016 AD), TU BIM Financial Accounting (ACC 201) 2017 AD (Board exam paper, 2017 AD), TU BIM Financial Accounting (ACC 201) 2018 AD (Board exam paper, 2018 AD), TU BIM Financial Accounting (ACC 201) 2019 AD (Board exam paper, 2019 AD), TU BIM Financial Accounting (ACC 201) 2021 AD (Board exam paper, 2021 AD), TU BIM Financial Accounting (ACC 201) 2014 AD (Board exam paper, 2014 AD), TU BIM Financial Accounting (ACC 201) 2013 AD (Board exam paper, 2013 AD), TU BIM Financial Accounting (ACC 201) 2012 AD (Board exam paper, 2012 AD), TU BIM Financial Accounting (ACC 201) 2010 AD (Board exam paper, 2010 AD) and TU BIM Financial Accounting (ACC 201) 2009 AD (Board exam paper, 2009 AD). Answers are written for this site; check them against your class notes.