Tuesday, April 29, 2025

BCA PAPER CODE BCAC202 SEM -2 [2024]

 

MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL

Paper Code: BCAC202
Basics of Web Design Using HTML, CSS, JavaScript
UPID: 2000079

Time Allotted: 3 Hours
Full Marks: 70

The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable.


Group-A (Very Short Answer Type Questions)

Answer any ten of the following: (1 × 10 = 10)

  1. What is the use of the <noscript> tag in JavaScript?

  2. Which HTML tag is used for making character appearance bold?

  3. How can we change the background color of an element?

  4. What type of CSS is generally recommended for designing large web pages?

  5. Which keyword is used to define a variable in JavaScript?

  6. What is Remote Login?

  7. What is the smallest header in HTML by default?

  8. What will be the output of the following CSS code snippet?

    css
    Copy
    Download
    h1 { color: "green"; }
  9. Which CSS selectors are used to specify a group of elements?

  10. What is the full form of "HTTP"?

  11. What is the extension of JavaScript files?

  12. What is a Meta Search Engine?


Group-B (Short Answer Type Questions)

Answer any three of the following: (5 × 3 = 15)

2. HTML Lists and Tables

  • Differentiate between an Ordered list (<ol>) and an Unordered list (<ul>).

  • Write HTML code to create a table with 2 columns and 2 rows.

3. Web Design Basics

  • Write steps to add an image in a webpage.

  • What is Responsive Design?

  • What are the ways of defining a variable in JavaScript?


Group-C (Long Answer Type Questions)

Answer any three of the following: (15 × 3 = 45)

4. JavaScript Concepts

  • Differences between var and let keywords with examples.

  • Advantages of External JavaScript with an example.

  • What is the NaN property in JavaScript?

5. Web Technologies

  • What is BOM (Browser Object Model)?

  • Differentiate between client-side and server-side scripting.

  • Explain the format of a URL and the purpose of port numbers.

6. HTML Tags and Attributes

  • Difference between <em> and <i> tags.

  • Basic structure of an HTML template.

  • Explain srcaltwidth, and height attributes.

7. CSS Selectors and Styling

  • Explain Class Attribute and ID Selector with examples.

  • Steps to set a background color for text using CSS (include code).

8. Web Design Practices

  • Advantages of collapsing white space in HTML.

  • How to display a "Welcome" message using the onload function.

  • What happens if you open an external CSS file in a browser?

*************************End OF PAPER**************
Solutions
****************

Group-A (Very Short Answer Type Questions)

Answers (Any 10):

  1. <noscript> Tag: Displays alternate content when JavaScript is disabled.

    html
    Copy
    Download
    Run
    <noscript>Your browser does not support JavaScript!</noscript>
  2. Bold Text Tag<b> or <strong>.

  3. Change Background Color:

    css
    Copy
    Download
    body { background-color: #f0f0f0; }
  4. CSS for Large PagesExternal CSS (linked via <link>).

  5. JavaScript Variablevarlet, or const.

  6. Remote Login: Accessing a computer/system from a distant location (e.g., SSH).

  7. Smallest HTML Header<h6>.

  8. CSS OutputError (invalid color value; remove quotes: color: green;).

  9. Group SelectorsClass selectors (e.g., .group { }).

  10. HTTP Full FormHyperText Transfer Protocol.

  11. JS File Extension.js.

  12. Meta Search Engine: Aggregates results from multiple engines (e.g., Dogpile).


Group-B (Short Answer Type Questions)

2. Ordered vs. Unordered List & Table

Differences:

  • Ordered List (<ol>): Numbered (1, 2, 3).

  • Unordered List (<ul>): Bulleted (•, ▪).

HTML Table:

html
Copy
Download
Run
<table border="1">
  <tr>
    <td>Row 1, Cell 1</td>
    <td>Row 1, Cell 2</td>
  </tr>
  <tr>
    <td>Row 2, Cell 1</td>
    <td>Row 2, Cell 2</td>
  </tr>
</table>

3. Image in Webpage & Responsive Design

Steps to Add Image:

html
Copy
Download
Run
<img src="image.jpg" alt="Description" width="200" height="100">

Responsive Design: Adapts layout to different screen sizes (uses CSS media queries).

JS Variables:

javascript
Copy
Download
var x = 5;       // Function-scoped
let y = 10;      // Block-scoped
const z = 15;    // Immutable

Group-C (Long Answer Type Questions)

4. JavaScript: var vs. let, External JS, NaN

var vs. let:

  • var: Function-scoped, hoisted.

  • let: Block-scoped, no hoisting.

    javascript
    Copy
    Download
    if (true) {
      var a = 1;  // Accessible outside
      let b = 2;  // Block-limited
    }

External JS Advantages:

  • Reusability across pages.

  • Better performance (cached).

  • Separation of concerns.

NaN: "Not a Number" (e.g., 0/0).

5. BOM, Client vs. Server, URL Format

BOMBrowser Object Model (e.g., windownavigator).

Client vs. Server:

Client-Side (Browser)Server-Side (Backend)
HTML/CSS/JSPHP, Node.js, Python
Runs on user’s deviceRuns on server

URL Format:

Copy
Download
protocol://domain:port/path?query#fragment

Port Purpose: Identifies specific services (e.g., 80 for HTTP).

6. HTML Tags & Attributes

<em> vs. <i>:

  • <em>: Semantic emphasis (screen readers stress it).

  • <i>: Visual italicization only.

HTML Template:

html
Copy
Download
Run
<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
</head>
<body>
  <!-- Content -->
</body>
</html>

Image Attributes:

  • src: Source path.

  • alt: Alternate text (accessibility).

  • width/height: Dimensions.

7. CSS Class vs. ID & Background Color

Class vs. ID:

  • Class (.class): Multiple elements.

  • ID (#id): Unique element.

    css
    Copy
    Download
    .highlight { color: yellow; }
    #header { font-size: 24px; }

Text Background:

css
Copy
Download
p { background-color: lightblue; }

8. White Space, onload, External CSS

Collapsing Whitespace:

  • HTML merges multiple spaces into one (improves readability).

onload Welcome Message:

javascript
Copy
Download
<body onload="alert('Welcome!')">

External CSS in Browser:

  • Displays raw CSS code (not rendered as a webpage).


Thanks
SK Institute


No comments:

Post a Comment