The ______ attribute of the button element specifies the type of the button.

  • class 
  • role 
  • type 
  • value 
The type attribute of the button element indicates the type of the button, such as "submit", "reset", or "button". It determines how the button behaves when it's clicked. For example, a "submit" type will submit the form data. 

What specific challenges might a developer encounter when styling "th" elements, and how can they be overcome?

  • "th" elements can't be styled. 
  • Different default styles applied by browsers. 
  • Inconsistent vertical alignment across browsers. 
  • Overhead due to excessive CSS. 
Different browsers have default styles for "th" elements, which may include bold text, centered text, etc. This can lead to inconsistencies when viewing the styled table across various browsers. To ensure a consistent appearance, developers should reset or override these default styles using CSS. This can include explicitly setting properties like font-weight, text-align, and others. 

The ______ attribute is used in the video element to automatically play the video when the webpage loads.

  • autoplay 
  • autostart 
  • immediateplay 
  • playnow 
The autoplay attribute, when used within the

The ______ tag within the head section is used to write internal CSS.

  • link 
  • meta 
  • script 
  • style 
The style tag is used within the head section of an HTML document to include internal (or embedded) CSS. This method allows you to add styles directly within the HTML document. While the style tag is useful for small projects or single-page websites, for larger projects, it's typically more efficient to use external stylesheets linked via the link tag. 

How do the autoplay and muted attributes in the video tag affect user experience and webpage performance?

  • Autoplaying without muted can be intrusive and disrupt user experience, but autoplay with muted can provide seamless content delivery. 
  • They affect the website's SEO ranking directly. 
  • They prevent the video from being downloaded. 
  • They speed up the website loading time. 
Autoplaying multimedia, especially videos with sound, can be disruptive to users. It's considered bad practice because it can surprise and annoy users. Some browsers block videos that autoplay with sound, but allow autoplay if the video is muted. By using the "autoplay" and "muted" attributes together, developers can provide a smoother user experience by having videos play automatically but without sound. However, always consider user preferences and the context of the webpage when implementing these features. Performance-wise, autoplay can lead to additional bandwidth usage, which might be a concern for users on limited data plans. 

The ______ property is used in CSS to apply a shadow to a table.

  • border-shadow 
  • box-shadow 
  • cell-shadow 
  • table-shadow 
The box-shadow property in CSS allows designers to add shadow effects around an element's frame. It can be used to create a shadow for block-level elements, including tables. By using the box-shadow property, designers can provide depth to their designs, making certain elements stand out or giving a floating effect. 

How does the browser render an inline-block element that doesn’t fit into the remaining line space?

  • It hides the overflow content. 
  • It moves the element to the next line. 
  • It reduces the size of the element to fit the line space. 
  • It stretches the line space to accommodate. 
When an inline-block element doesn’t fit into the remaining space of a line, the browser moves it entirely to the next line, treating it somewhat like a word in a text that doesn’t fit at the end of a line. Inline-block elements are unique in that they flow like inline elements but retain block-level styling capabilities, allowing them to maintain width and height properties. 

How does the rowspan attribute affect the layout of a table?

  • It lets the content span across multiple rows. 
  • It merges columns horizontally. 
  • It sets the height of a row. 
  • It specifies the row's alignment. 
The rowspan attribute in an HTML table is used within a

or

element to allow that cell to span over multiple rows. This is beneficial when you have data that relates to several subsequent rows. For instance, if you have an entry that is relevant for two rows, you can use

to let that cell content span across those rows, effectively merging those cells vertically. 

Suppose you have multiple inline elements that need to be aligned vertically center. How would you achieve this using CSS?

  • Set line-height to the height of the container. 
  • Use position: absolute; with a defined top value. 
  • Use vertical-align: middle; on the inline elements. 
  • Use vertical-align: top; on the inline elements. 
The vertical-align: middle; property is often used to vertically center inline elements like text inside a container. It's important to note that this property doesn't always work as expected with block elements, but for inline and inline-block elements, it's a go-to solution. 

Which of the following elements is an inline element?

  •  
  •  

  •  

  •  
Inline elements do not start on a new line and only take up as much width as necessary. is a typical example of an inline element, while elements like

,

, and

are block-level elements that take up the full width of their container and start on a new line.