Intro to software technology- HTML and CSS
Questions
Which CSS property is used to change the text color?
- color
- float
- box-shadow
- clear
What does the CSS 'color' property do?
- Change the text color
- Change the background color
- Highlight the text
- Change the border color
Which CSS property is used to set the background color of an element?
- background-color
- font-family
- position
- height
What does the CSS 'background-color' property do?
- Set the text color
- Set the background color of an element
- Change the page theme
- Color the element's border
Which CSS property is used to specify the font for text?
- padding
- font-family
- box-shadow
- clear
What does the CSS 'font-family' property do?
- Change the font size
- Make the text bold
- Align the text
- Specify the font for text
Which CSS property is used to set the size of the text?
- margin
- font-size
- border-radius
- clear
What does the CSS 'font-size' property do?
- Set the size of the text
- Change the font family
- Adjust the line height
- Make the text bold
Which CSS property is used to set how thick or thin characters in text should be displayed?
- font-weight
- clear
- cursor
- font-size
What does the CSS 'font-weight' property do?
- Set how thick or thin characters in text should be displayed
- Set the font size
- Change the text style to italic
- Adjust the letter spacing
Which CSS property is used to specify the horizontal alignment of text?
- font-family
- border
- margin
- text-align
What does the CSS 'text-align' property do?
- Specify the vertical alignment of text
- Change the text direction
- Indent the first line of text
- Specify the horizontal alignment of text
Which CSS property is used to create space around elements, outside of any defined borders?
- margin
- z-index
- padding
- position
What does the CSS 'margin' property do?
- Create space inside an element's borders
- Create space around elements, outside of any defined borders
- Set the border width
- Align an element to the center
Which CSS property is used to create space around an element's content, inside of any defined borders?
- position
- color
- padding
- box-shadow
What does the CSS 'padding' property do?
- Create space outside of the element's borders
- Define the height of the element
- Set the border thickness
- Create space around an element's content, inside of any defined borders
Which CSS property is used to specify the border style, width, and color of an element?
- width
- border
- float
- z-index
What does the CSS 'border' property do?
- Create space outside the element
- Specify the border style, width, and color of an element
- Create space inside the element
- Round the corners of an element
Which CSS property is used to round the corners of an element's outer border edge?
- border-radius
- width
- margin
- background-color
What does the CSS 'border-radius' property do?
- Create a circular border only
- Increase the border thickness
- Round the corners of an element's outer border edge
- Add a shadow to the border
Which CSS property is used to set the width of an element?
- background-color
- width
- box-shadow
- z-index
What does the CSS 'width' property do?
- Set the width of an element
- Set the maximum width
- Adjust the margin width
- Scale the element proportionally
Which CSS property is used to set the height of an element?
- height
- opacity
- font-family
- text-align
What does the CSS 'height' property do?
- Set the height of an element
- Set the line height of text
- Adjust the padding height
- Align elements vertically
Which CSS property is used to specify the display behavior (e.g., block or inline) of an element?
- padding
- display
- position
- font-size
What does the CSS 'display' property do?
- Specify the display behavior (e.g., block or inline) of an element
- Hide an element completely from the source code
- Change the stacking order
- Make an element responsive
Which CSS property is used to specify the type of positioning method used for an element?
- font-family
- float
- position
- opacity
What does the CSS 'position' property do?
- Align text within a container
- Float an element to the left
- Specify the type of positioning method used for an element
- Define the display order
Which CSS property is used to position an element to the left or right, allowing text to wrap around it?
- margin
- width
- float
- padding
What does the CSS 'float' property do?
- Make an element hover above others
- Center an element horizontally
- Clear floated elements
- Position an element to the left or right, allowing text to wrap around it
Which CSS property is used to specify what elements can float beside the cleared element?
- font-weight
- border-radius
- clear
- float
What does the CSS 'clear' property do?
- Specify what elements can float beside the cleared element
- Remove an element from the page
- Erase the element's styling
- Reset the margins and padding
Which CSS property is used to specify the stack order of an element?
- z-index
- color
- float
- font-size
What does the CSS 'z-index' property do?
- Set the zoom level of an image
- Specify the stack order of an element
- Change the opacity of an element
- Define the grid layout axis
Which CSS property is used to set the transparency level for an element?
- z-index
- border
- opacity
- font-weight
What does the CSS 'opacity' property do?
- Set the transparency level for an element
- Change the brightness of an image
- Hide the element from screen readers
- Make the background transparent only
Which CSS property is used to specify the mouse cursor to be displayed when pointing over an element?
- padding
- cursor
- height
- border-radius
What does the CSS 'cursor' property do?
- Track the user's mouse movements
- Create a custom animation
- Disable clicking on an element
- Specify the mouse cursor to be displayed when pointing over an element
Which CSS property is used to attach one or more shadows to an element?
- box-shadow
- opacity
- border-radius
- z-index
What does the CSS 'box-shadow' property do?
- Create a text shadow
- Darken the background color
- Attach one or more shadows to an element
- Add a solid border to an element
What does CSS stand for?
- Cascading Style Sheets
- Computer Style Sheets
- Creative Style Sheets
- Colorful Style Sheets
Where in an HTML document is the correct place to refer to an external style sheet?
- In the <body> section
- In the <head> section
- At the end of the document
- Before the <html> tag
Which HTML tag is used to define an internal style sheet?
- <css>
- <script>
- <style>
- <link>
Which is the correct CSS syntax?
- body {color: black;}
- body:color=black;
- {body:color=black;}
- {body;color:black;}
How do you insert a comment in a CSS file?
- /* this is a comment */
- // this is a comment
- // this is a comment //
- ' this is a comment
How do you select an element with id 'demo'?
- .demo
- #demo
- demo
- *demo
How do you select elements with class name 'test'?
- #test
- test
- .test
- *test
How do you select all p elements inside a div element?
- div + p
- div > p
- div p
- div.p
How do you group selectors in CSS?
- Separate each selector with a plus sign
- Separate each selector with a comma
- Separate each selector with a space
- Place them inside the same parentheses
What is the default value of the position property?
- relative
- absolute
- static
- fixed