Which HTML element is used to define a short inline quotation?

  •  

  •  
  •  
  •  
The element is used to define a short inline quotation. Unlike the

element, which is used for longer quotations that are displayed in a block format, the element is intended for short quotations that remain within the flow of a paragraph or sentence. 

Can block-level elements be placed inside inline-level elements without affecting validity and semantics?

  • It depends on the HTML version used. 
  • No, it's semantically incorrect. 
  • Only if the inline element has a display setting of 'block'. 
  • Yes, they can be nested without issues. 
Semantically, block-level elements should not be nested inside inline-level elements. Doing so can lead to unpredictable behavior in rendering and can also make the HTML document invalid. This practice goes against the standard document flow where block-level elements are used to structure the content while inline-level elements style specific parts within those blocks. 

You need to load a script without blocking the HTML parser during the loading phase. How would you use the "async" and "defer" attributes to achieve this, and what are the key differences between them?

  • Use "async" and "defer" interchangeably as they have identical functionalities. 
  • Use "async" to load the script after the HTML is parsed and "defer" to execute the script immediately. 
  • Use "async" to load the script in parallel and execute it as soon as it finishes downloading; use "defer" to load the script in parallel but defer its execution until after the HTML is parsed. 
  • Use "async" to pause the HTML parser and "defer" to load the script in parallel. 
Both "async" and "defer" are attributes used with