HTML and CSS

Description: A test of HTML and CSS
Number of Questions: 25
Created by:
Tags: HTML CSS Web Designing Web Development Internet Internet Technologies Style Sheets BBA / BBS / BCA Information Technology
Attempted 0/25 Correct 0 Score 0

Which of the following tags in NOT related to creating a table?

  1. th

  2. td

  3. tr

  4. tt

  5. table


Correct Option: D
Explanation:

The tt tag is used for displaying teletype of monospaced text. It is not related to the designing of a table.

Which of the following attributes of a textbox limits the number of characters it can hold?

  1. length

  2. value

  3. size

  4. limit

  5. maxlength


Correct Option: E
Explanation:

The maxlength attribute specifies the number of characters that the user can enter in a textbox. This value can be more than the value specified for the 'size' attribute.

HTML documents are read and rendered by ________.

  1. Compiler

  2. Interpreter

  3. Browser

  4. Network

  5. Web server


Correct Option: C
Explanation:

A Web browser like Internet explorer, Chrome or FireFox can interpret the set of HTML tags within the page in order to display the page on the screen as the page's creator intended it to be viewed. It recieves the HTML tags from the server, reads it and renders or creates the page on the client system accordingly.

Which of the following statements is FALSE regarding HTML tags?

  1. HTML tags are case sensitive.

  2. Some html tags are not required to be closed.

  3. The opening and closing html tag is optional.

  4. HTML tags can have attributes.

  5. HTML tags can be written using any text editor.


Correct Option: A
Explanation:

HTML tags are not case sensitive. For example to create a paragraph we can write P or p. The tags in XML are case sensitive.

What can be defined as a white space between the cell content and its borders?

  1. Cell spacing

  2. Cell width

  3. Table border

  4. Cell padding

  5. Cell height


Correct Option: D
Explanation:

Cell padding is the white space between the cell content and its borders. It defines the distance between the cell text and the boundary of the cell.

Which of the following is NOT a valid HTML tag?

  1. INPUT

  2. SUB

  3. META

  4. CAPTION

  5. HEADING


Correct Option: E
Explanation:

Heading is not a valid tag in HTML.

Which of the following is NOT an attribute of the img tag?

  1. src

  2. align

  3. border

  4. size

  5. alt


Correct Option: D
Explanation:

To define the size of the image, the correct attributes are width and height. Size is not a valid attribute of the img tag.

Which of the following is NOT a valid attribute for a frame target?

  1. _blank

  2. _new

  3. _self

  4. _parent

  5. _top


Correct Option: B
Explanation:

The _new attribute is not a valid html attribute.

Which attribute of the input tag is used to create a Text Box?

  1. input type = textbox

  2. input type = text

  3. input type = label

  4. input type = textfield

  5. textarea


Correct Option: B
Explanation:

Input type=Text or simply input creates a standard textbox. This can also have a value attribute, which sets the initial text in the textbox.

Which of the following is NOT a value for the background-repeat property?

  1. repeat

  2. repeat-x

  3. repeat-y

  4. norepeat

  5. no-repeat


Correct Option: D
Explanation:

This is an invalid property value.

HTML is a subset of which of the following languages?

  1. SGML

  2. DHTML

  3. XML

  4. JSP

  5. None of the above


Correct Option: A
Explanation:

SGML or Standard Generalized Markup Language is the standard technology for defining generalized markup language for documents. HTML is an example of SGML based languages. SGML is not a language in itself but a description of how to specify a language.

Which of the following is NOT a valid statement with reference to CSS?

  1. CSS defines how to display HTML elements.

  2. External style sheets are stored in CCS files.

  3. Styles were added from HTML 4.0.

  4. External style sheets can save a lot of work.

  5. A CSS rule has two main parts: a selector, and one or more declarations.


Correct Option: B
Explanation:

Style sheets are normally saved in external .CSS files not .CCS files.

Which of the following is NOT a valid attribute of the a(anchor) tag?

  1. type

  2. rel

  3. href

  4. name

  5. link


Correct Option: E
Explanation:

Link is an invalid attribute in the a(anchor) tag.

Which of the following is the correct syntax for making all the paragraph (p) tags bold?

  1. p {text-size:bold;}

  2. p {text-size=bold;}

  3. p {font-weight:bold;}

  4. p style=text-size:bold;

  5. p={text-size:bold}


Correct Option: C
Explanation:

The font-weight property sets how thick or thin characters in text should be displayed. It can be used to display the text in bold letters.

With reference to CSS, which font property is used to display the text in bold letters?

  1. font-style

  2. font-variant

  3. font-weight

  4. font-size

  5. font-family


Correct Option: C
Explanation:

The font-weight property sets how thick or thin characters in text should be displayed. The 'bold' or 'bolder' properties can be used to display the text in bold letters.

Which of the following tags is used to display a heading in smallest size?

  1. h1

  2. p

  3. h5

  4. h6

  5. h7


Correct Option: D
Explanation:

The h6 tag is the smallest heading tag. If some text is written inside a h6 and /h6 tag, it appears in bold but small letters. It can be used to display headings of a specific topic in a webpage.

Which html tag is used to divide an HTML document into different sections or parts?

  1. division

  2. frame

  3. div

  4. table

  5. body


Correct Option: C
Explanation:

The div tag defines a division or a section in an HTML document. It is also used to group block-elements to format them with CSS.

Which of the following statements is the correct syntax to create an email hyperlink?


Correct Option: A
Explanation:

We can use the mailto command in an A HREF link tag to create an email link. Clicking on the link will invoke the clients' email client automatically. 

Which of the following is NOT a valid html form element?

  1. fieldset

  2. option

  3. select

  4. choice

  5. input


Correct Option: D
Explanation:

Choice is not a valid html form element.

Which of the following statements is FALSE regarding !DOCTYPE declaration?

  1. It can appear anywhere in an HTML page.

  2. !DOCTYPE is not an HTML tag.

  3. It does not have an end tag.

  4. If the !DOCTYPE is not specified the page will be rendered in quirks mode.

  5. The !DOCTYPE refers to DTD.


Correct Option: A
Explanation:

The !DOCTYPE declaration must be the very first thing in your HTML document, before the html tag.

Which of the following statements is FALSE regarding the class' selector in CSS?

  1. The class selector is used to specify a style for a single, unique element.

  2. The class selector is defined with '.' (dot).

  3. Class name should comprise only alpha numeric characters, and hyphens.

  4. The name of the class can be as desired by the user.

  5. It is used with style sheets.


Correct Option: A
Explanation:

The id selector is used to specify a style for a single, unique element whereas the class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.

Which of the following is NOT a valid attribute of the while creating a radio button using the input tag?

  1. checked

  2. value

  3. name

  4. type

  5. selected


Correct Option: E
Explanation:

Selected is not a valid attribute of a Radio Button. To select a Radio Button the attribute checked is used.

Which tag is used to display the fullform of a abbreviation as a tooltip when the user places the mouse over it?

  1. acronym

  2. code

  3. dd

  4. blockquote

  5. cite


Correct Option: A
Explanation:

The acronym tag defines an acronym.An acronym can be spoken as if it were a word, example HTML, ASP, etc. By marking up acronyms we can give useful information to browsers, spell checkers, translation systems and search-engine indexers. It has been replace by the abbr tag in HTML 5

Which of the following is NOT a valid shape type with reference to ImageMap?

  1. oval

  2. rect

  3. default

  4. circle

  5. poly


Correct Option: A
Explanation:

Oval is not a valid value for the shape type. Although we can create a circle using the 'circle' attribute.

Which of the following is tag is used to create an inline frame?

  1. iframe

  2. inframe

  3. form

  4. frame

  5. frameset


Correct Option: A
Explanation:

The HTML iframe tag is used to specify an inline frame. An inline frame allows us to embed another document within the current HTML document. We  can use the iframe src attribute to specify the source of the other document, as well as other attributes to determine the height, width, scrolling properties, border, etc.

- Hide questions