Past Papers, UOS Main Campus, Website Design and Usability

Website Design & Usability Past Paper 2013 – BS IT 2nd Term UOS (SE-493)

ProgramBS IT
Term2nd
Year2013
Course codeSE-493
AnswersSolved ✓

University of Sargodha BS IT 2nd term Website Design & Usability (SE-493) paper, 2013 exam (80 marks, 2:30 hours). The paper has been retyped, and solved answers with code are given below for all 16 short questions and all six long questions, including XHTML and HTML5, linear and protected site structures, meta elements, the complete pc.htm web form, web fonts and the three types of CSS.

Solved answers

Q1 – Short answers (16 × 2)

1. Markup language: A language that uses tags to describe the structure and presentation of text, e.g. HTML and XML (<h1>Title</h1>).

2. Why the head element? <head> holds information about the page that is not shown in the body: <title>, meta data (charset, description, keywords), links to style sheets and scripts.

3. Ordered vs unordered list: <ol> displays items with numbers or letters where order matters; <ul> displays items with bullets where order does not matter. Items use <li>.

4. Linking an external style sheet: In the head: <link rel="stylesheet" href="styles.css"> (or @import url("styles.css"); inside a style element).

5. HTML5 doctype: Write <!DOCTYPE html> as the very first line of the document.

6. Absolute vs relative paths: An absolute path gives the full URL or full path from the root (https://site.com/images/a.jpg); a relative path is given relative to the current file’s location (images/a.jpg or ../a.jpg).

7. Protocol; HTTP vs FTP: A protocol is a set of rules for communication between computers. HTTP transfers web pages between browser and web server (port 80); FTP transfers files (upload/download) between computers (ports 20/21).

8. Reload a page with meta: <meta http-equiv="refresh" content="30"> reloads the page every 30 seconds; content="5; url=new.html" redirects after 5 seconds.

9. Style rule: h1, h2 { background-color: rgba(255, 0, 0, 0.7); color: black; }

10. Country input box: <input type="text" name="country" id="country" value="Pakistan">

11. Client-side vs server-side program: A client-side program runs in the user’s browser (JavaScript) – validation, effects. A server-side program runs on the web server (PHP, ASP.NET, JSP) – database access, generating pages – and sends the result to the browser.

12. Concatenating strings in JavaScript: Using the + operator or concat(): var s = "Shining" + " " + "Study"; or s1.concat(s2) or template literals.

13. GET vs POST: GET sends form data appended to the URL (visible, limited length, can be bookmarked, for searches). POST sends data in the request body (not visible in URL, no size limit, used for sensitive or large data and changes on the server).

14. Option button vs check box: Option (radio) buttons in a group allow only one choice; check boxes allow selecting none, one or many options independently.

15. Navigation list: A list of links that lets users move around the site. In HTML5: <nav><ul><li><a href="index.html">Home</a></li><li><a href="about.html">About</a></li></ul></nav>

16. Open a link in a new window/tab: Add target="_blank": <a href="page.html" target="_blank">Open</a> (with rel=”noopener” for security).

Q2 – XHTML and the development of HTML5

XHTML (Extensible HTML, W3C 2000) reformulated HTML 4.01 as an XML application. Its rules are stricter: all tags and attributes in lowercase, every element closed (<br />), properly nested elements, attribute values in quotes, a required doctype and a single root <html> element. It aimed at clean, well-formed code that could be processed by XML tools and different devices. XHTML 2.0 was planned but was not backward compatible and was abandoned.

Development of HTML5: in 2004 browser makers (Apple, Mozilla, Opera) formed WHATWG to evolve HTML practically. The W3C joined the work in 2007, and HTML5 became a W3C Recommendation in October 2014 (now the HTML Living Standard). HTML5 added a simple doctype (<!DOCTYPE html>); semantic elements (header, nav, section, article, aside, footer); native <audio> and <video>; <canvas> and SVG graphics; new form input types (email, date, number, range) and attributes (placeholder, required); APIs such as local storage, geolocation, drag-and-drop, web workers and offline apps; and it reduced the need for plug-ins such as Flash. It allows both HTML and XHTML syntax.

Q3 – Linear and protected structures of a website

Linear structure: pages are arranged in a sequence, each page linking to the next (and previous) page, like chapters in a book: Home → Page 1 → Page 2 → … It suits tutorials, slide shows, online tests and order forms where the user must follow a fixed order. Variations: augmented linear (links back to the home page/first page on each page) and hierarchical/mixed structures for larger sites. Drawback: users cannot jump directly to other pages.

Protected structure: part of the site is restricted so that only authorised users can reach it. Public pages are open to everyone, but protected pages (e.g. member area, admin panel, online banking) are reached only after logging in with a username/password; the server checks the session before showing them. Links to protected pages are hidden or lead to a login page. It is used for members-only content, paid content and administration, and uses HTTPS, authentication and access control.

Q4 – Metadata and meta elements

Metadata is data about the document – its character set, author, description, keywords, viewport settings, refresh/redirect behaviour. It is not displayed, but browsers use it to render the page correctly, search engines use it for indexing and snippets (SEO), and social media use it for previews.

<meta charset="UTF-8">
<meta name="description" content="Solved past papers of University of Sargodha">
<meta name="keywords" content="UOS, past papers, BS IT">
<meta name="author" content="Shining Study">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="60">
<meta name="robots" content="index, follow">

Attributes: name/content pairs for general information, http-equiv to simulate HTTP headers (refresh, content-type), and charset for character encoding.

Q5 – Web form in pc.htm

<form action="process.php" method="post">
  <fieldset>
    <legend>Customer Information</legend>
    <label>First Name: <input type="text" name="fName" id="fName"></label>
    <label>Last Name: <input type="text" name="lName" id="lName"></label>
    <label>Street: <input type="text" name="street" id="street"></label>
    <label>City: <input type="text" name="city" id="city"></label>
    <label>Phone: <input type="tel" name="phone" id="phone"></label>
  </fieldset>
  <fieldset>
    <legend>Computer Options</legend>
    <label>Processor:
      <select name="pSpeed" id="pSpeed">
        <option value="Core i3">Core i3</option>
        <option value="Core i5">Core i5</option>
        <option value="Core i7">Core i7</option>
      </select></label>
    <label>Memory:
      <select name="mem" id="mem">
        <option value="2 GB">2 GB</option>
        <option value="4 GB">4 GB</option>
        <option value="6 GB">6 GB</option>
        <option value="8 GB">8 GB</option>
      </select></label>
    <label>Monitor:
      <select name="monitor" id="monitor">
        <option value="15.5">15.5</option>
        <option value="18.5">18.5</option>
        <option value="23">23</option>
      </select></label>
    <label>Hard Drive:
      <select name="hd" id="hd">
        <option value="320 GB">320 GB</option>
        <option value="500 GB">500 GB</option>
        <option value="1000 GB">1000 GB</option>
      </select></label>
    <p>DVD burner:
      <label><input type="radio" name="dvd" value="yes"> Yes</label>
      <label><input type="radio" name="dvd" value="no" checked> No</label></p>
    <p>Tuner card:
      <label><input type="radio" name="tuner" value="yes"> Yes</label>
      <label><input type="radio" name="tuner" value="no" checked> No</label></p>
    <p>Media card reader:
      <label><input type="radio" name="mCard" value="yes"> Yes</label>
      <label><input type="radio" name="mCard" value="no" checked> No</label></p>
    <label><input type="checkbox" name="warranty" value="yes">
      Add the 24-month extended warranty</label>
  </fieldset>
  <label>Additional information / comments:<br>
    <textarea name="comments" id="comments" rows="5" cols="50"></textarea></label>
  <p><input type="submit" value="send Order">
     <input type="reset" value="cancel Order"></p>
</form>

Each selection list uses option values that match the option text; the three option-button groups share a name so only one choice can be selected in each; the check box sends warranty=yes only when ticked. (The markup was checked with an HTML parser.)

Q6 – Short notes

1. Web fonts: fonts downloaded by the browser along with the page so text appears in the designer’s chosen typeface even if the user does not have it installed. They are declared with the CSS @font-face rule (formats WOFF/WOFF2, TTF, EOT) or loaded from services like Google Fonts:

@font-face { font-family: "MyFont"; src: url("myfont.woff2") format("woff2"); }
body { font-family: "MyFont", Arial, sans-serif; }

A fallback font stack should always be given; large font files slow loading, so only needed weights should be used.

2. History of HTML: Tim Berners-Lee created HTML at CERN in 1989–1991 for the World Wide Web. HTML 2.0 (1995, IETF), HTML 3.2 (1997, W3C – tables, applets), HTML 4.01 (1999 – style sheets, scripting, frames), XHTML 1.0 (2000 – XML-based), HTML5 (W3C Recommendation 2014; WHATWG Living Standard today) with semantic elements, multimedia and APIs.

Q7 – Three types of CSS

  • Inline CSS: written in the style attribute of an element – affects only that element: <p style="color:red;">Text</p>. Quick, but mixes style with content and is hard to maintain.
  • Internal (embedded) CSS: written in a <style> element in the head – applies to one page: <style> p { color: blue; } </style>.
  • External CSS: rules saved in a separate .css file linked to many pages with <link rel=”stylesheet” href=”style.css”>; changing one file changes the whole site, and the browser caches it.

Cascade order: inline styles override both other types; between internal and external style sheets, the rule that comes later in the document wins when specificity is equal (usually the internal style, because it is placed after the link); !important can override this.

Save this paper for offline studyDownload the question paper, or save the paper together with all solved answers as a PDF.
↓ Download Paper (JPG)

About Saif R

An educator and technology enthusiast passionate about empowering students through quality education and digital learning. Dedicated to making academic resources and opportunities accessible to everyone.