CSS Styling Images


  1. Which should be used to overlay text on image with high contrast?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    To overlay text on an image with high contrast, we can place a semi-transparent background color or “screen” behind the text to improve legibility. The majority of photographs have quite high contrast, that means they are not ideal for use as background image.


  1. ID selector name is preceded by __________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    In CSS class selector name is preceded by a full stop (‘.’) and ID selector name is preceded by hash character (‘#’).



  1. Which of the following will represent browsers in their normal states?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    There are five major categories for image replacement i.e. CSS ON/Images ON, CSS ON/Images OFF, CSS OFF/Images ON, CSS OFF/Images ON, CSS OFF/Images OFF, Extra Unnecessary Markup. CSS ON/Images ON represents browsers in their normal states and all the techniques should pass their test.


  1. Clip property is not supported in ____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    There is one more way of hiding elements by clipping them. Clip-path property is not fully supported in IE or Edge yet. If using external SVG files for clip-path, support is even more limited.



  1. Which of the following technique is also known as Fahrner Image Replacement?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    CSS ON/Images On technique is also known as FIR or “Fahrner Image Replacement”. The premise here is to use a span to wrap the text inside the header and use that span to hide the text. It works but we have to use display:none.