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

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

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy