WorksheetsCP12-Q2
Total questions: 50
Worksheet time: 25mins
Which HTML tag is used to embed another webpage into the current document?
<embed>
<iframe>
<div>
<object>
Which attribute specifies the URL of an iframe’s content?
href
src
path
link
Which attribute allows a YouTube video inside an iframe to play in fullscreen mode?
allowfullscreen
frameborder
autoplay
display
Which CSS property can align two <div> elements side by side?
float
align
position
margin
The <div> tag is mainly used to ___.
Insert Images
Group and Style Contents
Create Links
To organize html elements
You want to embed Google Maps showing your school location into your webpage. Which HTML element is most appropriate?
<div>
<map>
<frame>
<iframe>
Which layout method gives the most flexible and modern design?
Table
Float
Flexbox
Frameset
What is the BEST reason for replacing frames with <div> and CSS layout?
Frames are not mobile-friendly.
Divs make scrolling difficult.
Frames use less code.
Divs cannot include content.
The <form> element in HTML is primarily used to ___.
Display videos
Collect user input
Add headers
Format paragraphs
Which attribute defines where form data will be sent?
action
name
method
id
The attribute that determines how form data is sent is ___.
type
value
class
Which input type allows a user to choose only one option from a group?
checkbox
text
radio
select
Which control is best for long written feedback?
<input type="text">
<textarea>
<select>
<output>
A form uses method="get" for login credentials. What is the possible issue?
Data appears in the URL
Data is hidden
Data is encrypted
Data is not sent
Why is it important to add for attribute to <label> tags in a form?
It adds spacing
It validates data automatically
It adds color to labels
It links text to form inputs
Which input type allows user input to be automatically hidden or in a bullet form.
Text
Password
Number
Symbol
Which of the following attributes allows users to increment or decrement a specific value when using <input type=“number”>
skip
value
++
step
What does CSS stand for?
Creative Style System
Computer Script Syntax
Cascading Style Sheet
Color Sheet Style
Who proposed CSS IN 1994?
Håkon Wium Lie
Tim Berners-Lee
Bill Gates
Steve Jobs
What is the main purpose of CSS?
Create structure
Control the layout and design
Store data
Add hyperlinks
What is the most important reason in creating an external CSS?
To save data faster
To make updating easier
To encrypt data
To allow developers have freedom in styling
Which CSS version introduced animations, transitions, and grid layout?
CSS1
CSS2
CSS3
CSS4
Cascading is best described as ___.
Styles are applied in alphabetical order.
Styles are random.
Styles follow a priority order.
Styles apply only once.
Which CSS feature allows websites to adapt to screen sizes?
Media Queries
Transitions
Animations
Overflow
Why is CSS essential in web design?
It removes layout
It replaces HTML tags.
It slows down browsers.
It helps webpages look organized
Which of the following shows correct CSS syntax?
selector: value;
property=value;
style {property:value}
selector { property: value; }
Inline CSS is defined in ___.
the head section
the start tag
a separate CSS file
browser default
Internal CSS is defined in ___.
the head section
the start tag
a separate CSS file
browser default
External CSS is linked by ___.
<import="style.css">
<style src="style.css">
<link rel="stylesheet" href="style.css">
<link rel="style.css” href= “stylesheet>
Which is an advantage of using external CSS?
Allows reusability
Works for one page only
Needs no linking
Slows webpage loading
When multiple CSS rules apply to the same element, which one takes the highest priority?
Inline
Internal
External
Browser Default
You are building a three-page portfolio website. How can you ensure all pages share the same color scheme and layout?
Use inline CSS on every element.
Repeat internal CSS on each page.
Use HTML tables for design.
Create an external CSS file and link it to all.
Which of the styles has the lowest priority?
External
Browser Default
Inline
Internal
Which of the following comes before the declaration block?
property
selector
value
CSS rule
The symbol # represents which selector type?
element
class
ID
group
The symbol . represents which selector?
element
class
ID
group
The universal selector * means:
Apply styles to all elements
Apply styles to IDs and class
Apply styles to all IDs
Apply styles to all class
Which selector is used to style both <h1> and <p> elements?
#h1, #p
h1 + p
.h1, .p
h1, p
The ID selector should be used when ___.
You need to style all elements
You have to reuse a specific rule
You need to style one unique element
You style nested class
Why are class selectors better than inline styles in large projects?
They improve reusability
They slow rendering
They are easier to look at
Inline style is better than class selectors
Which selector is most efficient for applying the same style to multiple different tags?
Universal selector
ID selector
Class selector
Group selector
Which CSS rule correctly centers all paragraphs with class “center”?
.center p { text-align: center; }
p.center { text-align: center; }
#center p { align: center; }
p#center { align: center; }
The selector .highlight applies style to ___.
All elements
Elements with class “highlight”
Elements with id “highlight”
All headings, for emphasis
The selector #main applies to ___.
One unique element
Multiple class element
Across different element elements
All elements inside the body
Which selector targets multiple elements with shared style?
Group selector
ID selector
ID selector
Inline style
Which of the following is the correct syntax for a group selector?
.group1, .group2{ color: blue; }
h1, #p { color: blue; }
h1, p { color: blue; }
h1.group1 { color: blue; }
Which selector allows you to center all paragraphs?
#p {text-align: center;}
.p {align: center;}
p {text-align: center;}
*p {align: center;}
Which of the following is true if you do the code div {align: center;} ?
One div will be centered
All the text inside the div will be centered
All div will be centered
Nothing will change in the design
You are designing a webpage where only the paragraphs with class “note” should appear in red, while other elements with the same class keep their original color. Which CSS rule should you use?
#note p { color: red; }
.note { color: red; }
p.note { color: red; }
p { color: red; }
Which selector applies Arial font to every element on the page?
#all { font-family: Arial;}
* { font-family: Arial; }
p { font-family: Arial; }
.font { font-family: Arial;}
