Machine-translated by Google. Questions are authored in English.
Top

Computer Internet Questions and Answers

51.

Which of the following is a valid JavaScript function to output "Hello, World!" to the console ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: C

The valid function is console.log("Hello, World!").

In JavaScript, console.log() writes a message to the browser's or Node.js console, and is the standard way to print debugging output.

console.print, log.console and alert.console do not exist. (alert() on its own shows a pop-up box, not console output.)

Related methods are console.error() and console.warn(), which write error and warning messages.

Please log in or register to report this question.

52.

Which of the following is a valid method to apply an external JavaScript file to an HTML document ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: B

The valid method is <script src="file.js">.

An external JavaScript file is linked with the src attribute of the script element: <script src="file.js"></script>.

href belongs to links and stylesheets, not scripts. There is no javascript element in HTML, and file is not an attribute of script.

The script element can be placed in the head or at the end of the body, and the defer attribute delays running it until the page is parsed.

Please log in or register to report this question.

53.

What is the main purpose of the < meta > tag in HTML ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: B

The key gives To specify the character encoding of the document.

The meta tag supplies metadata about the page to the browser and search engines, and its best-known use is declaring the character set, as in <meta charset="UTF-8">. It also carries the description, keywords and viewport settings.

The document title is set with the title tag, hyperlinks with the a tag, and JavaScript is included with the script tag.

Please log in or register to report this question.

54.

Which of the following is the correct syntax for making a list in HTML ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: B

The correct syntax uses <ul> and <li>.

An unordered list is written <ul><li>Item 1</li></ul>: ul for the list and li for each item. (The option as printed drops the '<' before /li, a misprint, but it is the only one using the right elements.)

HTML has no list or item elements, so the other three options are not valid HTML.

An ordered (numbered) list uses ol in place of ul, with the same li items.

Please log in or register to report this question.

55.

Which of the following HTML tags is used to display an image on a webpage?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: B

An image is displayed with <img>.

The img element embeds an image, with its file given in the src attribute and a text alternative in alt, as in <img src="photo.jpg" alt="...">.

picture is a container that offers alternative sources for an img inside it, not a replacement for it. There is no image element in HTML, and src is an attribute, not a tag.

Please log in or register to report this question.

56.

Which of the following is the correct way to include a CSS file in an HTML document ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: D

The correct way is <link rel="stylesheet" href="style.css">.

An external CSS file is linked in the head with the link element, whose rel attribute says the file is a stylesheet and whose href gives its address.

A link without rel="stylesheet" does not apply the styles, there is no css element, and the style element holds CSS written inline; it has no src attribute.

Please log in or register to report this question.

57.

What is the main function of the DOM (Document Object Model) ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: B

The DOM's main function is to represent the page so that JavaScript can manipulate it.

The Document Object Model represents an HTML document as a tree of objects (nodes) that scripts can read and change: adding elements, changing text and styles, and responding to events, all without reloading the page.

The structure is written in HTML, styling is done by CSS, and the browser loads the page; the DOM is the programming interface to the loaded page.

Please log in or register to report this question.

58.

Which of the following is used to make a webpage responsive (i.e., adapt to different screen sizes) ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: B

A responsive webpage is made with Media queries in CSS.

Media queries apply different CSS rules depending on the screen width, height or orientation, as in @media (max-width: 600px) { ... }, so the layout adapts from desktop to phone.

JavaScript can adjust a page but is not the standard tool for responsive layout, HTML5 provides structure rather than adaptive styling, and PHP runs on the server, not on the screen size of the device.

Please log in or register to report this question.

59.

Which of the following is a valid HTML5 input type for selecting dates ?

Exam Year(s)

Tripura Public Service Commission - 2025,

Answer: A

The input type for dates is <input type="date">.

HTML5 added type="date", which shows a date picker and returns the date as YYYY-MM-DD.

type="time" selects a time of day, not a date, and there is no calendar input type. The old datetime type was dropped from the standard in favour of datetime-local.

Browsers that do not support a date picker fall back to a plain text box.

Please log in or register to report this question.

60.

Which HTML5 element is used for drawing graphics on the fly ?

Exam Year(s)

Tripura Public Service Commission - 2026,

Answer: B

The element is <canvas>.

The HTML5 canvas element provides a bitmap drawing surface. JavaScript draws on it on the fly through its 2D or WebGL context, with lines, shapes, images and text drawn pixel by pixel. That makes it suited to games, charts and animation.

The svg element also produces graphics, but it describes them declaratively as vector shapes kept in the page's DOM, rather than drawing them by script on a pixel surface. There are no standard HTML elements called graphic or draw.

Please log in or register to report this question.

Loading…
Tags: Computer Internet Questions and Answers || Computer Internet MCQ Questions and Answers || Computer Internet GK Questions and Answers || Computer Internet GK MCQ Questions || Computer Internet Multiple Choice Questions and Answers || Computer Internet GK || GK on Computer Internet || Computer Awareness Questions and Answers || Computer Awareness MCQ Questions and Answers || Computer Awareness GK Questions and Answers || GK on Computer Awareness