Computer Knowledge

Markup and Web Languages

1,701 Questions

Test your understanding of HTML tags, XML structures, and web page creation technologies. The questions cover elements like CSS styling, parsing documents, and defining web attributes. This section is essential for candidates appearing for computer proficiency tests in various competitive exams.

HTML tags and attributesXML document parsingCSS styling levelsWeb page creation basicsBrowser compatibility

Markup and Web Languages Questions

Multiple choice

Which HTML attribute is used to specify the width of an image?

  1. width

  2. height

  3. src

  4. alt

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The 'width' attribute in the <img> element specifies the width of the image in pixels or as a percentage of the parent container.

Multiple choice

What is the purpose of the <script> tag in HTML?

  1. To define the structure of the web page

  2. To provide styling information for the web page

  3. To include JavaScript code into the web page

  4. To insert an image into the web page

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The <script> tag in HTML is used to include JavaScript code into the web page, allowing you to add dynamic behavior and interactivity to the page.

Multiple choice

Which HTML element is used to create a horizontal line?

  1. <hr>


  2. <p>

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The <hr> element in HTML is used to create a horizontal line, typically used to separate different sections or content on a web page.

Multiple choice

What is the correct syntax for creating a link to another web page in HTML?

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In HTML, a link to another web page is created using the <a> element, with the 'href' attribute specifying the destination URL and the link text displayed to the user.

Multiple choice

Which HTML element is used to create a paragraph?

  1. <p>

  2. <h1>

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The <p> element in HTML is used to create a paragraph, which is a block of text that typically contains one or more sentences.

Multiple choice

What is the purpose of the <title> tag in HTML?

  1. To define the structure of the web page

  2. To provide styling information for the web page

  3. To specify the title of the web page

  4. To insert an image into the web page

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The <title> tag in HTML is used to specify the title of the web page, which is displayed in the browser's title bar and search engine results.