Sample questions
Question 1Medium
Which of the following indicates the standard attributes specified when defining a FRAME?
- SRC and NAME
- SRC, NAME, and ROW
- NAME and FRAMESET
- BODY, SRC, and TITLE
Answer: A. SRC and NAME
Explanation
src and name indicates standard attribute when defining a frame.
1.src Specifies the URL of the document to show in a frame.
2.name Specifies the name of a frame.
Step-by-step solution
- A frame needs a src attribute to name the page it shows.
- A frame also needs a name attribute to identify it.
- Option B adds ROW, which is not a frame attribute.
- Option C and option D include frameset, body or title, which are not frame attributes.
- So the correct answer is option A, SRC and NAME.
Why the other options are wrong
- B. ROW is not a frame attribute; it belongs to the frameset tag.
- C. FRAMESET is a tag, not an attribute of a frame.
- D. BODY and TITLE are not frame attributes.
Tip: A frame uses src for the page and name for its id; rows and cols belong to frameset.
Question 2Medium
Which of the following statements is true?
- HTML documents involving frames should contain both the BODY and FRAMESET tag.
- FRAME can be used in place of FRAMESET.
- HTML documents involving frames should contain only the BODY tag.
- HTML documents involving frames should contain the FRAME-SET tag and not the BODY tag.
Answer: D. HTML documents involving frames should contain the FRAME-SET tag and not the BODY tag.
Explanation
An HTML frameset takes the place of the body in an HTML document. Elements that would normally occur in the body of an HTML document must not appear before the frameset.
Step-by-step solution
- A frameset document uses a FRAMESET element in place of the BODY element.
- The frames are declared inside the FRAMESET, so the document must not use BODY.
- So the statement that says FRAMESET should be used and BODY should not is true.
Why the other options are wrong
- A. A frameset page must not use BODY, so requiring it is wrong.
- B. FRAME cannot replace FRAMESET. Frames sit inside a frameset.
- C. A frameset page uses FRAMESET, not BODY.
Tip: Frames are an old HTML feature. Frameset pages are replaced in HTML5.
Question 3Medium
Which of the following is not an attribute of the FRAME tag?
- SCROLLING
- AUTO
- MARGINWIDTH
- FRAMEBORDER
Answer: B. AUTO
Explanation
auto is not attribute of frame tag.
frame tag attributes:-
1.scrolling-Specifies whether or not to display a border around a frame.
2.marginwidth-Specifies the left and right margins of a frame.
3.frameborder-Specifies whether or not to display a border around a frame
Step-by-step solution
- Scrolling, marginwidth and frameborder are all attributes of the frame tag.
- Auto is a value that scrolling can take, not an attribute of frame.
- So AUTO (option B) is the one that is not a frame attribute, as the correct answer says.
Why the other options are wrong
- A. SCROLLING is a real frame attribute that controls scroll bars.
- C. MARGINWIDTH is a real frame attribute for the left and right margins.
- D. FRAMEBORDER is a real frame attribute that controls the border.
Tip: Check whether a word is an attribute name or only a value of one. auto is a value of scrolling.
Question 4Medium
How are frames loaded into the browser window?
- Top-to-bottom, right-to-left
- Top-to-bottom, left-to-right
- Bottom-to-top, left-to-right
- Bottom-to-top, right-to-left
Answer: B. Top-to-bottom, left-to-right
Explanation
frames are loaded from top to bottom and left to right.
Step-by-step solution
- The browser loads frames in reading order.
- It starts at the top and moves left to right.
- That is top-to-bottom, left-to-right, so the correct answer is option B.
Why the other options are wrong
- A. Right-to-left is not the loading order.
- C. Loading starts at the top, not the bottom.
- D. Loading starts at the top and goes left to right, so this option is wrong.
Tip: Browser layout reads like a page: top to bottom, then left to right.
Question 5Medium
What is syntax to create 3 row frames(horizontal frames)?
- <frameset rows="25%,*,25%">
- <frameset ="25%,*,25%">
- <cols="25%,*,25%">
- None of these.
Answer: A. <frameset rows="25%,*,25%">
Explanation
this will create 3 horizontal frames with height 25%,50%,and 25%.
Step-by-step solution
- A frameset with rows splits the page into horizontal bands.
- The rows value 25 percent, star, 25 percent makes three bands.
- The star takes the rest, which is 50 percent.
- Option B and option C are malformed, and option D is wrong.
- So the correct answer is option A.
Why the other options are wrong
- B. The frameset tag has no equals sign after its name, so the rows value is lost.
- C. The cols attribute is not written without the frameset tag, so it is malformed.
- D. Option A is correct, so none of these is wrong.
Tip: Rows splits horizontally into bands; cols splits vertically into columns; star takes the leftover space.
Question 6Medium
What is syntax to create 3 column frames(vertical frames)?
- <frameset cols="25%,*,25%">
- <frameset ="25%,*,25%">
- <cols="25%,*,25%">
- None of these.
Answer: A. <frameset cols="25%,*,25%">
Explanation
this will create 3 vertical frames with width 25%,50%,and 25%.
Step-by-step solution
- Column frames are set with the cols attribute of the frameset tag.
- cols=25%,*,25% gives three columns: 25 percent, the rest, and 25 percent.
- The middle column gets the remaining 50 percent, so the correct answer is option A.
Why the other options are wrong
- B. The attribute name cols is missing before the equals sign.
- C. This is not a frameset tag, so the frame layout is not created.
- D. Option A is valid, so none of these is wrong.
Tip: The cols attribute on frameset sets columns; rows sets rows.
Question 7Medium
Which of the following are attribute of frameset?
- Class
- Id
- style
- All of these
Answer: D. All of these
Explanation
The <frameset>tag defines a frameset.
The <frameset> element holds one or more <frame> elements.
Each <frame> element can hold a separate document.
The <frameset> element specifies HOW MANY columns or rows there will be in the frameset, and HOW MUCH percentage/pixels of space will occupy each of them.
standard attributes:-
1.class:-Specifies a classname for an element
2.id:-Specifies a unique id for an element
3.style:-Specifies an inline style for an element
4.title:-Specifies extra information about an element
Step-by-step solution
- The frameset tag accepts the standard attributes: class, id, style and title.
- Class, id and style are all in that list, so each one is valid.
- So all of these are attributes of frameset, and the correct answer is option D.
Why the other options are wrong
- A. Class is valid, but the question needs all of these.
- B. Id is valid, but it is not the only attribute.
- C. Style is valid, but it is not the only attribute.
Tip: For which-are questions, check each option before choosing a group.
Question 8Medium
Which event attribute is supported by <frameset>
to run script when a document load.
- onload
- onupload
- Any of above
- None of above
Answer: A. onload
Explanation
An onload event attribute is supported by <frameset>
to run script when a document loads.
Step-by-step solution
- The frameset tag supports the onload event, which runs a script when the document loads.
- Onupload is not a real HTML event attribute.
- Since onload is supported, the correct answer, option A (onload), is right.
Why the other options are wrong
- B. Onupload is not a real event attribute in HTML.
- C. Not all of the above is true, because onupload is not valid.
- D. Frameset does support onload, so none of the above is wrong.
Tip: Event attributes are the word on plus the event name, such as onload, onunload or onclick.
Question 9Medium
What is a syntax to create mixed frameset?
<frameset rows="50%,50%">
<frameset cols="25%,75%">
</frameset>
</frameset>
<frameset>
<frameset cols="25%,75%"> </frameset>
</frameset>
<frameset rows="50%,50%">
< cols="25%,75%">
</ >
</frameset>
- None of these.
Answer: A.
Explanation
the frameset will consist of two rows.
and second row is divided into two columns. with 25% and 75% width.
Step-by-step solution
- Option A sets an outer frameset with two rows of 50% and 50%.
- It nests a frameset with two columns, 25% and 75%.
- This is the mixed layout the question means: rows at the top level with columns inside.
- So the answer is option A.
Why the other options are wrong
- B. The outer frameset has no rows attribute, so the row layout is missing.
- C. The second frameset tag is malformed: it has no name and a stray closing tag.
- D. Option A is a valid layout, so None of these is wrong.
Tip: Frameset rows and cols take comma lists of sizes; a nested frameset splits one area again.
Practise all 9 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →