HTML MCQs
HTML MCQs
< h3 >
Mobile applications
Operating systems
To provide interactivity
Functionality
Structure(Correct Answer)
Security
Text documents
Image galleries
Which of the following is identified as the primary function of the CSS property 'font-family'?
The font size of text elements
Which is the actual CSS property that is used to identify the background color of an element?
color
background-color(Correct Answer)
text-color
background-image
Which of the following is identified as the purpose of the CSS property "text-align"?
The spacing between lines of text
body
.all
#all
Identify the key differences between inline CSS and external CSS.
Inline CSS is more efficient than external CSS.
External CSS allows for better separation of concerns compared to inline CSS.(Correct Answer)
color(Correct Answer)
text-color
foreground-color
Identify the CSS property that responsible for controlling the space between lines of text within an element.
line-height(Correct Answer)
letter-spacing
word-spacing
line-spacing
Which of the following is considered as the differences between the CSS margin property and the padding property?
Margin adds space inside the element, while padding adds space outside the element.
Margin adds space outside the element, while padding adds space inside the element.(Correct Answer)
Classify the distinctions between the background-color and background-image properties in CSS.
background-color sets the color behind the background image, while background-image sets the image to be displayed.
background-color only supports solid colors, while background-image can include images and gradients.(Correct Answer)
background-color and background-image are interchangeable and perform the same function.
&
$(Correct Answer)
Select the directive that allows you to include the content of one file in another.
@include
@define
@import(Correct Answer)
All of these
Which of the following is regarded as the correct syntax for @import directive?
@import -filename;
@import +filename;
@import filename
@import
@transfer
@extend(Correct Answer)
Select the Sass function that is used to get the length of the string.
stringlength(string)
length(string)
str-length(string)
len(string)(Correct Answer)
@if
@for(Correct Answer)
@each
Strings of texts
Colors
SASS facilitates us to write codes easily and efficiently, and they are easy to maintain
SASS is a superset of CSS that contains all CSS features and is an open-source pre-processor coded in Ruby.
Identify the file extension that commonly associated with SASS files.
.scss(Correct Answer)
.css
.sass
.html
@media
>
float()
margin()
float()
display()
()
{}
[]
Identify the reason why SASS is referred as a superset of CSS from the following options.
SASS is called a superset of CSS because it is better than CSS.
SASS is called a superset of CSS because it is an open-source pre-processor written in the Ruby programming language.
SASS is called a superset of CSS because it contains all the features of CSS.(Correct Answer)
None of these
Select the operator that provides the path for the CSS stylesheets in the application.
:filename
:load_paths
:css_location(Correct Answer)
:template_location
None of these.
%primary-color: #888
@primary-color: #888
Identify the SASS directive used for error detection from the options provided.
@debug directive(Correct Answer)
@warm directive
@error directive
@import directive
Identify the HTML < meta > tag's primarily contribution to a webpage.
It defines the main content of the webpage.
To define a hyperlink
Select the method which is used to represent the hierarchical structure of an HTML document.
Through indentation(Correct Answer)
Identify the purpose of the < head > tag in an HTML document.
To define the main content of the document
Select the order in which HTML elements are organized within the < body > tag.
In a sequential order
In a random order
In a circular structure
Select the HTML tag which is used to create a container for metadata in the < head > section.
< link >
Identify the character entity that is used in HTML to print 3 consecutive blank spaces on the screen.
" 3 * & nbsp ; "
Select an appropriate HTML code to display the text "< html >" on a webpage.
"<html> "(Correct Answer)
">html<"
"&lesser;html&greater;"
Identify the entry page for a website which links to additional pages of the same website.
web page
first page
house page
Apply the concept of a system that responds to requests for pages from the browser.
web page
web browser
web server(Correct Answer)
None of these.
footer of a webpage
frames of a webpage
image of a webpage
Identify the tag used with title tag to make the title bold.
bold(Correct Answer)
italic
boldfont
bolds
A start tag, some content, and an end tag is often defined as.
data definition
meta data
HTML tags
frontslash(Correct Answer)
semicolon
comma
Define the purpose of the < meta > tag in the head section of an HTML document.
To insert a hyperlink
Identify the tag that is used to define the structure of an HTML document.
< body >
Choose the attribute which specifies the character encoding for the HTML document.
charset(Correct Answer)
encoding
meta
content
<b>
Select the correct option that tells how to create a hyperlink in HTML.
< a link = “www.thinkandlearn.com” > thinkandlearn.com < /a >
< ul >
< li >
The < hr > tag in HTML is used for _____. Select the correct option.
new line
vertical ruler
new paragraph
Select the correct container for < tr >, < th >, and < td > in HTML.
< data >
<t>
Bold text
Underlined text
Express the purpose of the HTML attribute href in the < a > tag.
Hyperlink reference(Correct Answer)
Hypertext reference
Hyperlink
Identify what does the HTML tag < ul > stand for.
Ordered List
List Item
List
Identify the tag which is used to describe each item in an HTML list.
< il >
Identify the HTML tags that is used to create a definition term in a description list.
< dt >(Correct Answer)
< dd >
< dl >
Identify the tag that is used for inserting the largest heading in HTML.
head
< h6 >
heading
title tag
html tag
body tag
< hr >
<a>
< li >
< ll >
< td >
< tt >
.html
.hml
Identify the CSS property that is used to set the text color of an element?
text-color
color(Correct Answer)
text-style
font-color
Classify How can you link an internal CSS style directly within an HTML document?
Using the < style > element in the < body > section(Correct Answer)
Using the < css > element in the < head > section
Using the < script > element in the < head > section
Using the < link > element in the < body > section
Identify the CSS property that is used to set the background color of an element.
color
background-color(Correct Answer)
bgcolor
background
text-weight: bold
text-style: bold
Identify the CSS property that is used to align text to the right within its containing element.
text-align: center
text-align: left
text-align: justify
Identify the CSS property that is used to control the style of a font, such as italic or normal
font-style(Correct Answer)
text-decoration
font-variant
text-style
Identify the CSS property that is used to remove the default bullet points from an unordered list.
list-style: none(Correct Answer)
list-type: none
list-decoration: none
bullet-style: none
Identify the CSS selector that is used to select all elements with a specific class.
#classname
classname(Correct Answer)
class:classname
element.classname
border: 2px
border-size: 2px
border-thickness: 2px
Identify the CSS property that is used to control the space inside the border of an element.
padding(Correct Answer)
margin
border-spacing
box-space
Select the CSS property that is used to create a transition effect between two states of an element.
transform
transition(Correct Answer)
animation
opacity
Select Which of the following CSS selectors has the highest specificity.
.class selector
Element selector
Universal selector
Select the CSS feature that allows developers to apply different styles based on the device characteristics.
Media Queries(Correct Answer)
Flexbox
Grid Layout
Transitions
Classify CSS attribute which is used to select elements with a specific attribute value.
class
id
attribute
[attribute=value](Correct Answer)
What is the inferred pseudo-class in CSS that targets links that have been visited?
:hover
:active
:visited(Correct Answer)
:link
Summarize the purpose of the "float" property in CSS commonly used in navigation bars.
It makes the element's background color transparent.
It allows elements to float to the left or right, often used for layout purposes.(Correct Answer)
Infer HTML attribute which is commonly used to specify the target destination of a link in a navigation bar.
href
target(Correct Answer)
link
destination
Select the CSS property which is commonly used to create a responsive grid layout.
flexbox(Correct Answer)
position
float
display
Identify the HTML element used for grouping together elements for styling purposes.
< section >
width(Correct Answer)
length
dimension
Creative
Content
Color
Show the HTML attribute used to specify additional information about an element.
style
class(Correct Answer)
id
alt
Translate the CSS property used to specify the width and height of an element into simpler terms.
Grouping
Dimension(Correct Answer)
Display
Positioning
Show the CSS property utilized for producing rounded corners on an element.
border-radius(Correct Answer)
corner-radius
round-corner
border-radius
Select the process by which CSS selectors can be grouped, in order to to apply the same styles to multiple elements.
Separate each selector with commas(Correct Answer)
Select the default value of the 'display' property for HTML elements.
inline
block(Correct Answer)
flex
outline
Identify the CSS properties via which an element can be set exactly 20 pixels from the top and 30 pixels from the left within its parent element.
position: absolute; top: 20px; left: 30px;(Correct Answer)
Select the CSS property that is used to specify the color of text within an HTML element.
font-color
text-color
color(Correct Answer)
text-style
Identify the CSS code snippet which can be used to select all < input > elements with the attribute type set to "checkbox".
input[type=checkbox]
input[type="checkbox"](Correct Answer)
input[type='checkbox']
checkbox[type=input]
Identify the process by which how a horizontal navigation bar can be created using CSS.
Apply float: left; to each list item.
Explain how to identify the appropriate CSS selector for targeting an element with a particular attribute and value.
Attribute selector(Correct Answer)
Pseudo-element selector
Descendant selector
Express how you can apply different styles to links based on their state, such as hover or visited, using CSS.
Using pseudo-elements
Flexbox
Floats
Clearfix
Select the default value for object-position that is in the center of their content box.
50% 100%
25% 25%
100% 100%
Outline
Boarderline
Select a CSS property that is used to set the background image of an element.
background-attachment
background-image(Correct Answer)
background-color
background-size
filter
visibility
overlay
background-attachment
background-size
background-image
Identify the actual option that represent the possible "CSS text-align" values.
justify, center, right and left(Correct Answer)
None of these.
JavaScript
Sass(Correct Answer)
PHP
LESS
Stylus
SCSS
Describe the CSS preprocessor language that relies on indentation and does not necessitate semicolons or brackets.
SASS
LESS
Stylus(Correct Answer)
SCSS
To create animations
Classify which of the following CSS preprocessor features allows variables to hold information that can be reused throughout a stylesheet.
Functions
Mixins
Nesting
Variables(Correct Answer)
Outline the term that refers to the process of designing the visual appearance and layout of a website.
Backend development
Database management
System administration
Less(Correct Answer)
jQuery
AngularJS
.html
.css
.styl(Correct Answer)
Identify the property in CSS that is used to change the background color of an element.
bgcolor
color
background-color(Correct Answer)
All of these
Identify the CSS property that is used to control the element's font-size.
text-style
text-size
font-size(Correct Answer)
None of these.
Select the CSS property that is used to create rounded corners for an element.
border-style
border-radius(Correct Answer)
border-width
border-color