Browse all practice questions for the CodeHS Advanced HTML and CSS Practice test. Search by topic, open any question and review its full explanation, then test yourself in the practice quiz.

CodeHS Advanced HTML and CSS Practice test course image
More practice questions

These questions are part of the practice quiz. Start practicing

  • What does a selector do in CSS?
  • What is the effect of the float property in CSS?
  • What is the role of media queries in responsive design?
  • What is the purpose of the 'alt' attribute in an image tag?
  • What do the :first-child and :last-child selectors do in CSS?
  • What syntax is used to define a CSS variable?
  • How can you make a button a different color when hovered over?
  • What does the display property set to flex do for an element?
  • What property is used to change the background color of an element in CSS?
  • Which of the following values can be used with the vertical-align property?
  • What is the purpose of media queries in CSS?
  • Which HTML tag is specifically designed for defining important text?
  • What does the filter property achieve in CSS?
  • How can you smoothly animate color changes using CSS?
  • Which tag is used for the second-largest heading in HTML?
  • How can you create a responsive navigation menu?
  • What does the z-index property control in CSS?
  • What property controls the font color in CSS?
  • What is the purpose of the `alt` attribute in HTML?
  • What does the class attribute do in HTML elements?
  • What is the CSS filter property used for?
  • What is the purpose of the CSS overflow property?
  • What is the use of the z-index property in CSS?
  • How would you style all <p> tags with a red color using CSS?
  • What does the border-radius property do in CSS?
  • Which pseudo-class is used to style elements when they are focused?
  • What is the difference between inline and block elements in HTML?
  • Which of the following best describes animation in web design?
  • What is the primary purpose of the <em> tag in HTML?
  • How do you adjust the spacing between words in CSS?
  • How do you apply multiple background images in CSS?
  • How do you prevent text from wrapping in a CSS container?
  • What is an image filter used for in web design?
  • What is the effect of the 'opacity' property in CSS?
  • How do inline elements behave compared to block elements in HTML?
  • How do you select an element with an ID in CSS?
  • What is a hyperlink?
  • To create a bold heading, which of the following tags would you use?
  • What are CSS transitions primarily used for?
  • What is the primary benefit of using filters on images in web design?
  • How would you change the font size of an element to 20 pixels?
  • How do you make an element invisible but still occupy space in the layout?
  • What principle is the DRY principal advocating for in web development?
  • Who is credited with inventing HTML and the World Wide Web?
  • Which of the following is part of CSS structure?
  • Which HTML element is used to create a hyperlink?
  • Which tag is utilized to make text italic in HTML?
  • What is an example of a semantic HTML element?
  • Which CSS property is used to change the background color of an element?
  • What does the :hover pseudo-class do in CSS?
  • What is the purpose of CSS?
  • What happens to the width and height of inline-block elements in CSS?
  • What does the 'display' property control in CSS?
  • What is the difference between margin and padding in CSS?
  • What does the <strong> tag indicate in HTML?
  • How do you create a CSS tooltip?
  • Which HTML tag is used for creating a hyperlink?
  • What is the difference between 'margin' and 'padding' in CSS?
  • Can you explain what a CSS grid layout is?
  • How would you make a list display horizontally in CSS?
  • What is a key technique for creating a responsive design in CSS?
  • What is the purpose of the 'display' property in CSS?
  • What are media queries in CSS used for?
  • What HTML tag would you use to create a hyperlink?
  • In HTML, which tag is appropriate for emphasizing text?
  • What is the primary benefit of using a CSS sprite?
  • What is the purpose of the :nth-child(n) selector in CSS?
  • How can you visually hide an element but keep it accessible for screen readers?
  • What does the display: flex; property do?
  • How can you center a block element horizontally in CSS?
  • What is the function of the <meta> tag in HTML?
  • What is the main difference between class selectors and ID selectors in CSS?
  • Which of the following elements is used for the largest heading in HTML?
  • What CSS property is used to change the background color of an element?
  • What is the purpose of the CSS flexbox layout?
  • What is the function of the <head> section in an HTML document?
  • What does the Box Model in web design represent?
  • What does the object-fit property do in CSS?
  • Which CSS property is used to control the spacing between lines of text?
  • What is an iFrame used for in HTML?
  • Which CSS property is used to add space around an element's content?
  • How do you set a background image in CSS?
  • In CSS, what does the z-index property control?
  • What is the purpose of a CSS reset?
  • Which CSS property controls the text size of an element?
  • Which property would you use to change the spacing around elements?
  • How can you hide an element in HTML using CSS?
  • Which of the following best describes a website?
  • Which CSS property controls the space inside an element?
  • How can the DRY principal benefit web development practices?
  • How do you comment in CSS?
  • What is the result of surrounding text with <strong> tags?
  • What is the purpose of the 'html' element in HTML5?
  • What are complementary colors?
  • How can you link an external CSS file to an HTML document?
  • What is the purpose of the style attribute in HTML?
  • What does the flexbox model primarily help with?
  • What is an essential characteristic of a proper hyperlink?
  • What role do `data-*` attributes serve in HTML?
  • What does the 'text-align' property do in CSS?
  • How can you change the font size of an element using CSS?
  • What effect does the cover value have in object-fit?
  • What are pseudo-classes in CSS?
  • Which attribute is better for styling multiple elements within an HTML document?
  • What property is used to specify the number of columns in a CSS grid layout?
  • What does the effect of using an Invert filter typically do to light areas in an image?
  • How can you apply a style to an HTML element with a specific class?
  • How are CSS styles applied specifically for print media?
  • What does the visibility attribute determine?
  • What is the function of the @import rule in CSS?
  • What does the term "inline" refer to when discussing the span tag?
  • What does "Mobile First" design emphasize?
  • How can you make text bold in HTML?
  • What symbol is used to denote a class selector in CSS?
  • What is the use of the opacity property in CSS?
  • What HTML element is used to define a footer for a document or section?
  • What does the 'border' property in CSS describe?
  • How do you add a border to an element in CSS?
  • What is the difference between `@media` and `@supports` in CSS?
  • What does the 'position' property in CSS control?
  • What happens to an element when its visibility is set to hidden?
  • What does the CSS property 'margin' control?
  • What is the difference between inline, block, and inline-block elements?
  • What happens if you do not specify a transition duration?
  • How does using the class attribute enhance HTML styling?
  • Which HTML tag is used to italicize text?
  • How do you control the vertical alignment of text within a table cell?
  • How can you create a fixed position navigation bar in CSS?
  • What is the purpose of the span tag in HTML?
  • How can you add a comment in CSS?
  • What is the key difference between absolute and relative positioning in CSS?
  • What does the property 'z-index' control in CSS?
  • How can you implement an image gallery layout?
  • How does the 'float' property function in CSS?
  • What HTML attribute is used to specify alternative text for an image?
  • What is the function of the display: flex; property in CSS?
  • What does the CSS Box Model include?
  • What is semantic HTML?
  • How do you include an external CSS file in an HTML document?
  • What is the primary use of the 'box-shadow' property in CSS?
  • What is the function of the <h1> tag in HTML?
  • Which property is used to center an element horizontally within its container?
  • What does the position property control in CSS?
  • What does the 'float' property do in CSS?
  • What is the purpose of the <meta> tag in an HTML document?
  • Which pseudo-class is used in CSS to style active links?
  • What does the term tree refer to in an HTML document?
  • What does the 'font-family' property do in CSS?
  • What does the nth-child selector do in CSS?
  • What does HTML stand for?
  • What HTML tag is used to create bold text in a webpage?
  • What is a common method for creating a modal dialog in CSS?
  • What does the 'overflow' property control in CSS?
  • What is the function of the 'position' property in CSS?
  • What does it mean to embed an object?
  • How do you create a list in HTML?
  • What is the purpose of the 'text-align' property in CSS?
  • What does the 'clear' property do in CSS?
  • How can you create an image map in HTML?
  • What feature does CSS Grid provide?
  • How do you center an element using CSS?
  • What is a common use of the :hover pseudo-class in CSS?
  • What does the <DOCTYPE> declaration do in an HTML document?
  • What does the visibility property do in CSS?
  • How do you add custom styles for printing a webpage?
  • What does the Invert filter do to an image's pixels?
  • What is the purpose of the transition-delay property?
  • Which tag is NOT valid for displaying text in HTML?
  • What does the CSS property 'display: none;' do to an element?
  • What does the 'overflow' property control in CSS?
  • What is the role of a stylesheet in web development?
  • How can you create a responsive design using CSS?
  • How does CSS specificity work?
  • What is the method to visually hide an element while keeping it accessible to screen readers?
  • What CSS property would you use to create a flexbox layout?
  • What does animation in web design create?
  • What do CSS selectors do?
  • How can you remove the default spacing around a list in CSS?
  • How can you create a dropdown menu in CSS?
  • Which HTML element is used to define an unordered list?
  • What is the function of the id attribute in HTML?
  • What attribute is used to specify the character encoding in an HTML document?
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy