CSS Quiz Exercise Lab

Front End Developers-Lab


CSS
Interview Questions and Anwsers

Practice Before Interview or Quiz

(CSS) Cascading Style Sheets are used to describe the appearance of Web content.


      CSS Quiz Exercise Lab

      What does styles do in Style sheets ?

      They tell how to display various elements.


      How CSS syntax is made up of?

      The CSS syntax is made up of three parts: a selector, a property and a value:


      Are CSS property names case-sensitive?

      No


      Does setting margin-top and margin-bottom have an affect on an inline element?
      Yes or No

      No


      Does setting padding-top and padding-bottom on an inline element add to its dimensions?
      Yes or No

      No


      If you have a <p> element with font-size: 10rem, will the text be responsive when the user resizes / drags the browser window?
      Yes or No

      No


      What is the difference between margin and padding

      See it yourself about the different between margin and padding . They have some differences: Margin is outer space of an element, while Padding is inner space of an element. Margin is the space outside the border of an element, while Padding is the space that is inside the border of it.

      Margin Vs Padding

      JavaScript can change HTML attributes. See it Yourself Tap margin boton or padding bottom to see it Yourself How it works!

      Padding is the space inside the border between the border and the actual image or cell contents. In the image, the padding is the yellow area around the contents. Note that padding goes completely around the contents: there is padding on the top, bottom, right and left sides.
      Margins are the spaces outside the border, between the border and the other elements next to this object. In the image, the margin is the red area outside the entire object. Note that, like the padding, the margin goes completely around the contents: there are margins on the top, bottom, right, and left sides.

      Look at this example for visual clarification generated with this code.

      marginvspadding

      The pseudo class :checked will select inputs with type radio or checkbox, but not <option> elements.
      True or False

      False


      In a HTML document, the pseudo class :root always refers to the <html> element.
      True or False

      True


      The translate() function can move the position of an element on the z-axis.
      True or False

      False


      Explain the difference between visibility:hidden; and display:none; ?

      Visibility:Hidden; - It is not visible but takes up it's original space.
      Display:None; - It is hidden and takes up absolutely no space as if it was never there.

      I would show you but you would not see anything! Good example here http://www.w3schools.com/css/css_display_visibility.asp

      Name three ways to define a color in html?

      1) Hex
      2) RGB
      3) Name (ie red)
      .colorMe { color:red; color:#ff0000; color:rgb(0,0,255); }

      How do you clear a floated element?

      A floated element is taken out of the document flow. To clear it you would need to do a clear:both or try overflow:auto on the containing div.
      Wrapper Div
      Floating Div
      Floating Div

      test
      test
      test


      Wrapper Div
      Floating Div
      Floating Div

      test
      test
      test
      clear:both; or overflow:auto on containing div

      Learn more here http://www.sitepoint.com/simple-clearing-of-floats/

      What is a sprite? How is it applied using CSS? What is the benefit?

      - A image sprite is a collection of images put into one single image.
      - Using css positioning you can show and hide different parts of the sprite depending on what you need.
      - Sprites reduces the number of http requsts thus reducing load time of page and bandwidth

      Buy Buttons using Sprite as background:

      Both buttons use the same background image. The only differece is in the positioning.
       

      Here is the actual background image:
      And the CSS. <style> .orangeBuyBtn { background: url('buyButtons-bg.gif') repeat-x 0 0; border-color: #5B5752 #6B6B6B #808080; border-style: solid; border-width: 1px; color: #FFFFFF; cursor: pointer; font-size: 14px; font-weight: bold; } .greenBuyBtn { background: url('buyButtons-bg.gif') repeat-x 0 -24px; border-color: #5B5752 #6B6B6B #808080; border-style: solid; border-width: 1px; color: #FFFFFF; cursor: pointer; font-size: 14px; font-weight: bold; } </style> Learn more about sprites at Smashing Magazine. Also see the Site Point article or this W3School Article.

      $(document).ready(function(){ $('.loader img').click(function() { $('.loader img').hide(); \\ $('.loader img').hide(); }); });




      Are you sure you're ready for this Quiz ?

      Front End Web Development Quiz By David Shariff

      Full CSS page

      Coming up! My E-Book
    1. Windows Vista

      Coming soon

      1. Go to Start then select Connect To.
      2. Wait a moment while your computer searches for all the wireless networks in range. Find somcablewifi from the list of available networks (SSIDs) and click it. Then click Connect.
      3. You will be prompted that you are connecting to an unsecured wireless network. Click Connect Anyway.
      4. Wait a few seconds while your computer acquires an IP address from the somcablewifi network.
      5. The status will display as Connected, signifying you are connected to the somcablewifi network.

      Also, the Wireless Network Connection icon will appear in your computer's system tray at the bottom of the screen near the clock. To display the strength of your connection, just hover over the icon with your mouse.

      Once you've joined our somcable WiFi network manually, your device automatically joins it whenever the network is in range. If more than one previously-used network is in range, your device joins the one last used.

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or username) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      Windows 7

      Connect to the SOMCABLE WiFi Network

      1. Open Connect to a Network by clicking the Start button, and then clicking Connect to.
      2. In the Show list, click Wireless.
      3. You'll see a list of the wireless networks currently available.
      4. Click on somcablewifi, and then click Connect.

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or username) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      Mac OS X®

      Make Sure WiFi Is Turned On

      WiFi is used on Macs to set up and manage WiFi connections. The WiFi icon is found in the menu bar next to the clock.

        If the icon is empty, WiFi is turned off, or you are not within WiFi range.

        If the icon is filled in, you are currently within WiFi range.

      To turn WiFi on

      1. Click the WiFi icon.
      2. Select Turn WiFi On.

      Connect to the SOMCABLE WiFi Network

      1. Click the WiFi icon.
      2. Find somcablewifi from the list of available networks (SSIDs) and select it.
      3. Wait a few moments while your Mac connects. Once connected, a check mark will appear in the WiFi menu next to the somcableywifi SSID.

      Once you've joined our SOMCABLE WiFi network manually, your device automatically joins it whenever the network is in range. If more than one previously-used network is in range, your device will join the one last used.

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or username) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      iPhone® or iPod touch®

      Make sure WiFi is turned on

      1. Tap Settings
      2. Tap WiFi
      3. Make sure WiFi is set to ON. If WiFi is set to OFF, tap the OFF button to turn it on.

      Connect to the SOMCABLE WiFi Network

      Once WiFi is turned on, it is easy to connect to SOMCABLE WiFi. From the iPhone or iPod Touch

      1. Tap Settings
      2. Tap WiFi
      3. Wait a moment as your iPhone or iPod touch detects the WiFi networks in range
      4. Find somcablewifi from the list of available networks (SSIDs) and tap it
      5. Wait a few seconds while your iPhone or iPod touch connects. Once connected, a check mark will appear next to the somcablewifi SSID

      Also, the WiFi icon will appear in your phone's status bar at the top of the screen when it is connected to a WiFi network. It will show connection strength as well. The more bars you see, the stronger your WiFi connection.

      Once you've joined the SOMCABLE WiFi network manually, your iPhone or iPod touch will automatically connect whenever the network is in range of one of SOMCABLE WiFi hotspots. If more than one previously used network is in range, your device will join the one last used.

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or username) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      Blackberry®

      Connect to the SOMCABLE WiFi Network

      1. From the Blackberry home screen, select the Menu key
      2. Roll the trackball to the icon for Set Up WiFi and click
      3. Use the trackball to scroll down to the Next button and click.
      4. Select Scan For Networks and click.
      5. Scroll down to somcablewifi from the list of available networks (SSIDs) and click it. You'll see a message that your Blackberry is connecting to somcableywifi
      6. Once your Blackberry connects to somcablewifi, you'll see "Connection Successful!" across the top of the screen. On this screen, you can save somcablewifi as a profile. Select Yes and click Next
      7. Click Finish.

      When you are connected, the WiFi logo across the top of your screen will turn black, and somcablewifi will display on the main screen below the clock.

      Once you've joined the SOMCABLEWiFi network, your Blackberry will automatically connect to it whenever the network is in range.

      Set the Browser to use WiFi

      After you've connected to somcablewifi, you'll need to configure the Blackberry browser to use WiFi as the preferred Internet connection.

      1. Launch the Blackberry's browser.
      2. Press the Menu key to display the browser's menu
      3. Select Options
      4. Select General Properties
      5. Click on the current setting for Default Browser and select WiFi Browser
      6. Press the End button and confirm your choice by clicking Save

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or user name) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Setup WiFi as the Preferred Voice Connection

      Some providers will allow you to use WiFi for voice service as well. This will enable you to make phone calls without using cellular plan minutes. Check with your cellular provider to see if this option is available with your plan.

      If so, you can configure your Blackberry to use WiFi as the preferred voice connection. With this, your Blackberry will use your cellular provider's network only when WiFi is unavailable.

      1. While on the Blackberry home screen, select the Menu key
      2. Roll the trackball to the icon for Manage Connections and click
      3. Scroll down to Mobile Network Options and click.
      4. Select Connection Preference and click.
      5. Select WiFi Preferred and click
      6. Press the end button and confirm your choice by clicking Save

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      Windows Mobile 5/6

      Note: Instructions may vary slightly from phone to phone as there are several different versions of Windows Mobile 5 and Windows Mobile. For details about your exact version, please consult your phone's documentation or visit http://www.microsoft.com/windowsmobile.

      Enable WiFi on your Phone

      1. Go to Start then Settings
      2. Select Connections from the tabs across the bottom
      3. Select Comm Manager

      Important Note: On some phones, the Comm Manager is in the Programs folder. Simply go to Start then to Programs and select the Comm Manager icon.

      1. Select the WiFi icon. When WiFi is activated, the icon fills in with green and the "x" mark disappears.

      Connect to the SOMCABLE WiFi Network

      1. Go to Start then Settings
      2. Select Connections from the tabs across the bottom
      3. Select Network Cards
      4. Find somcablewifi from the list of available networks (SSIDs) and select and hold it. Then select Connect
      5. In the next screen, make sure The Internet is selected and click OK
      6. Wait a few seconds while your phone is connecting to the SOMCABLE WiFi network. Once complete, the status will display as Connected
      7. Click OK from the top right section of the screen then close the Settings window with the x in the top-right section of the screen

      Once you've joined the SOMCABLE WiFi network manually, your device automatically joins it whenever the network is in range. If more than one previously used network is in range, your device will join the one last used.

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      Android

      Make sure WiFi is turned on

      Note: Your service provider may charge to surf the Web or download data.

      1. First, turn on your phone and start at the main screen
      2. Next, click on the Settings icon
      3. After that, press Wireless & networks followed by Wi-Fi settings
      4. Now, touch Menu followed by Scan in order to find available networks in range
      5. Next, touch somcablewifi to connect.
      6. Finally, look for the wireless indicator icon to verify that your smartphone is connected

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or username) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      iPad®

      Ensure WiFi is enabled

      1. Tap Settings
      2. Tap WiFi
      3. Make sure WiFi is set to ON. If WiFi is set to OFF, tap the OFF button to turn it on.
      4. Available WiFi networks appear under "Choose a Network".
      5. Locate and tap somcablewifi.

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or username) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that SOMCABLE WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.

      Android

      Ensure WiFi is enabled

      1. Tap Apps in the upper right hand corner
      2. Tap Setting
      3. Tap Wireless & networks
      4. Tap Wi-Fi – Turn on Wi-Fi.
      5. Available WiFi networks appear under "Wi-Fi settings – Set up & manage wireless access points."
      6. Locate and tap somcablewifi.

      Sign In to SOMCABLE WiFi

      Once you've connected to the somcablewifi network, simply launch your Web browser and you will be taken to the SOMCABLE WiFi login page.

      • Enter your Somcable.com email address (or username) and password
      • Click Sign In

      After you successfully enter your credentials, you will be directed to the somcable.com home page. From there, you can begin to browse the Internet.

      Technical Support

      Due to the numerous WiFi devices and configurations available, Somcable is only able to confirm that WiFi is functioning correctly. Somcable does not offer technical support for connecting devices to the Internet. Please refer to the user manual for your device should you require additional assistance.