Html miscellaneous


  1. Which of the following can be helpful in creating your own feature detect?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    If you want to create your own feature detects you can simply use Modernizr.addTest, a string is passed generally in lowercase without any punctuation like Modernizr.addTest(feature, test). It returns the Boolean value. Modernizr._domPrefixes works same as _prefixes. Modernizr.atRule is one of modernizr API(Application Programming Interface) having syntax like – Modernizr.atRule(prop).


  1. classPrefix is used when _____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    If modernizr’s class names are clashing with already existing class then we use classPrefix inside the configuration. It works same as hidden detects that adds .hidden class. Syntax is { “classPrefix”: “tee”, “feature-detects”: [“dom/hide”]}, this means instead of <html class=”hide”> we will get <html class=”tee-hidden”>.



  1. Which latest browser is able to detect CSS Grids?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Modernizr 3.1.0, Modernizr 3.1.1, Modernizr 3.4.0 and Modernizr 3.5.0 are the updated versions of modernizr which fixes some bugs and some updated the feature. Modernizr 3.5.0 can detect CSS Grids. In this latest Modernizr, we use two syntaxes, one is Modernizr.cssgrid, and an old syntax Modernizer.cssgridlegacy. In addition, there is a polyfill available named PEP.


  1. Modernizr.csstransformss detects _________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Modernizr.csstransforms detects CSS 2D transforms introduced by HTML5. CSS 3D transform is detected by Modernizr.csstransforms3d. Input types are detected by Modernizr.inputtypes[type], Input Attributes is detected by Modernizr.input[attribute].



  1. What is the JavaScript check for the HTML5 video feature?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    HTML5 feature video is detected by Modernizr.video. Modernizr.video[format] detects HTML5 video format feature. Modernizr.rgba detects rgba() feature of HTML5, hsla() is detected by Modernizr.hsla