HTML Quiz Exercise Lab

Front End Developers-Lab


HTML
Interview Questions and Anwsers

Practice Before Interview or Quiz

(HTML) HyperText Markup Language is the language used to describe and define the content of a Web page in a well-structured format.


      HTML Quiz Exercise Lab

      HTML stands for?

      HyperText Markup Language is the language used to describe and define the content of a Web page in a well-structured format.


      How many heading styles are there in HTML?

      6 headings, h1..h6


      How images are displayed on web pages in HTML?

      In HTML, images are defined with the tag. The tag is empty, which means that it contains attributes only and it has no closing tag. To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display on your page. The syntax of defining an image:


      Explain Form element used in HTML?

      A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form.A form is defined with the form tag.


      How colors are defined in HTML?

      HTML colors are defined using a hexadecimal (hex) notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one of the light sources is 0 (hex 00). The highest value is 255 (hex FF). Hex values are written as 3 double digit numbers, starting with a # sign.


      Explain about frames used in HTML?

      With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others.The disadvantages of using frames are: The web developer must keep track of more HTML documents It is difficult to print the entire page


      How to use styles in HTML?

      When a browser reads a style sheet, it will format the document according to it. There are three ways of inserting a style sheet:

      External Style Sheet An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the tag. The tag goes inside the head section.

      Internal Style Sheet An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section with the style tag.


      What is the difference between form get and form post?

      Get
      With GET the form data is encoded into a URL by the browser. The form data is visible in the URL allowing it to be bookmarked and stored in web history. The form data is restricted to ASCII codes. Because URL lengths are limited there can be limitations on how much form data can be sent.

      Post
      With POST all the name value pairs are submitted in the message body of the HTTP request which has no restrictions on the length of the string. The name value pairs cannot be seen in the web browser bar.

      POST and GET correspond to different HTTP requests and they differ in how they are submitted. Since the data is encoded in differently, different decoding may be needed.


      List some common IE6 bugs and how you dealt with them?

      Ie6 is not dead, just ask China which represents a nice chunk of the worlds online population. Your pages should at least be functional on IE6, unless you dont care about half the worlds population. See the links below for a good compilation of ie6 bugs and solutions.

      What is the importance of the HTML DOCTYPE?

      The doctype declaration should be the very first thing in an HTML document, before the html tag.

      The doctype declaration is not an HTML tag; it is an instruction to the web browser about what version of the markup language the page is written in.

      The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers can render the content correctly.


      <ul class="shopping-list" id="awesome">
          <li><span>Milk</span></li>
          <li class="favorite" 
      id="must-buy"><span class="highlight">Sausage</span></li> </ul>

      CSS:

      ul {
          color: red;
      }
      li {
          color: blue;
      }
      

      What is the color of the text Sausage ?

      • Red
      • Blue
      • Neither

      Blue


      <ul class="shopping-list" id="awesome">
          <li><span>Milk</span></li>
          <li class="favorite" 
      id="must-buy"><span class="highlight">Sausage</span></li> </ul>

      CSS:

      ul li {
          color: red;
      }
      #must-buy {
          color: blue;
      }
      

      What is the color of the text Sausage ?

    1. Red
    2. Blue
    3. Neither
    4. Blue


      <ul class="shopping-list" id="awesome">
          <li><span>Milk</span></li>
          <li class="favorite" 
      id="must-buy"><span class="highlight">Sausage</span></li> </ul>

      CSS:

      .shopping-list .favorite {
          color: red;
      }
      #must-buy {
          color: blue;
      }
      

      What is the color of the text Sausage ?

      • Red
      • Blue
      • Neither

      Blue


      <ul class="shopping-list" id="awesome">
          <li><span>Milk</span></li>
          <li class="favorite" 
      id="must-buy"><span class="highlight">Sausage</span></li> </ul>

      CSS:

      ul#awesome {
          color: red;
      }
      ul.shopping-list li.favorite span {
          color: blue;
      }
      

      What is the color of the text Sausage ?

      • Red
      • Blue
      • Neither

      Blue


      <ul class="shopping-list" id="awesome">
          <li><span>Milk</span></li>
          <li class="favorite" 
      id="must-buy"><span class="highlight">Sausage</span></li> </ul>

      CSS

      ul.shopping-list li .highlight {
          color: red;
      }
      ul.shopping-list li .highlight:nth-of-type(odd) {
          color: blue;
      }
      

      What is the color of the text Sausage ?

      • Red
      • Blue
      • Neither

      Blue


      Given the HTML below:

      <ul class="shopping-list" id="awesome">
          <li><span>Milk</span></li>
          <li class="favorite" 
      id="must-buy"><span class="highlight">Sausage</span></li> </ul>
      #awesome .favorite:not(#awesome) .highlight {
          color: red;
      }
      #awesome .highlight:nth-of-type(1):nth-last-of-type(1) {
          color: blue;
      }
      

      What is the color of the text Sausage ?

      • Red
      • Blue
      • Neither

      Red


      HTML:

      <p id="example">Hello</p>
      

      CSS:

      #example {
          margin-bottom: -5px;
      }
      

      What will happen to the position of #example?

      • It will move 5px downwards
      • All elements succeeding #example with move 5px upwards
      • Neither

      All elements succeeding #example with move 5px upwards


      HTML:

      <p id="example">Hello</p>
      

      CSS:

      #example {
          margin-left: -5px;
      }
      

      What will happen to the position of #example?

      • It will move 5px left
      • All elements preceding #example with move 5px to the right
      • Neither

      It will move 5px left 5px left


      HTML:

      <div id="test1">
          <span id="test2"></span>
      </div>
      

      CSS:

      #i-am-useless {
          background-image: url('mypic.jpg');
      }
      

      Are unused style resources still downloaded by the browser?

      • Yes
      • No
      • Sometimes

      No


      HTML:

      <div id="test1">
          <span id="test2"></span>
      </div>
      

      CSS:

      #test2 {
          background-image: url('mypic.jpg');
          display: none;
      }
      

      On page load, will mypic.jpg get downloaded by the browser?

      • Yes
      • No

      Yes


      HTML:

      <div id="test1">
          <span id="test2"></span>
      </div>
      

      CSS:

      #test1 {
          display: none;
      }
      #test2 {
          background-image: url('mypic.jpg');
          visibility: hidden;
      }
      

      On page load, will mypic.jpg get downloaded by the browser?

      • Yes
      • No

      No


      CSS:

      @media only screen and (max-width: 1024px) {
          margin: 0;
      }
      

      What is the use of the only selector?

      • Stops older browsers from parsing the remainder of the selector
      • Apply the style for screen only and ignore the device max-width
      • It does nothing

      Stops older browsers from parsing the remainder of the selector


      HTML:

      <div>
          <p>I am floated</p>
          <p>So am I</p>
      </div>
      

      CSS:

      div {
          overflow: hidden;
      }
      p {
          float: left;
      }
      

      Does overflow: hidden create a new block formatting context?

      • Yes
      • No

      Yes


      Explain Form element used in HTML?

      A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form.A form is defined with the form tag.


      CSS:

      @media only screen and (max-width: 1024px) {
          margin: 0;
      }
      

      Does the screen keyword apply to the device's physical screen or the browser's viewport?

      • Device's physical screen
      • Browser's viewport

      Browser's viewport


      Is <keygen> a valid HTML5 tag?

      • Yes
      • No

      Yes


      Does the <bdo> tag change the direction of text?

      • Yes
      • No

      Yes


      HTML:

      <figure>
      	<img src="myimage.jpg" alt="My image">
      	<figcaption>
      		<p>This is my self portrait.</p>
      	</figcaption>
      </figure>
      

      Is the above HTML valid?

      • Yes
      • No

      Yes


      In what situation should you use the <small> tag?

      • When you want to create subheading after a <h1> element
      • When you want to add copyright information inside a <footer>
      • Both situations

      When you want to add copyright information inside a <footer>


      Explain Form element used in HTML?

      A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form.A form is defined with the form tag.


      If a web page contains organic, multiple <h1> tags, will it affect the SEO negativley?

      • Yes
      • No

      No


      If you have a page of search results and want to highlight the search term, what HTML tag would you use?

      • <strong>
      • <mark>
      • <em>
      • <highlight>

      <mark>


      HTML:

      <article>
          <h1>Hello World</h1>
          <style scoped>
              p {
                  color: #FF0;
              }
          </style>
          <p>This is my text</p>
      </article>
      
      <article>
          <h1>This is awesome</h1>
          <p>I am some other text</p>
      </article>
      

      What does the scoped attribute do?

      • Applies style rules to elements succeeding it, but with the same parent element
      • Applies style rules to all children of the scoped parent element
      • Applies style rules to IE browsers only
      • None of the above

      Applies style rules to all children of the scoped parent element


      HTML:

      <article>
          <a href="#">
              <h1>Hello</h1>
              <p>I am some text</p>
          </a>
      </article>
      

      Does HTML5 support block-level links?

      • Yes
      • No

      Yes


      HTML:

      <img src="mypic.jpg" style="visibility: hidden" alt="My picture">
      

      Does the HTML above trigger a http request when the page first loads ?

      • Yes
      • No

      Yes


      HTML:

      <div style="display: none;">
          <img src="mypic.jpg" alt="My photo">
      </div>
      

      Does the HTML above trigger a http request when the page first loads?

      • Yes
      • No

      Yes


      HTML:

      <head>
          <link href="main1.css" rel="stylesheet">
          <script>
              alert('Hello World');
          </script>
      </head>
      

      Does main1.css have to be downloaded and parsed before Hello World is alerted?

      • Yes
      • No

      Yes


      HTML:

      <head>
          <link href="main1.css" rel="stylesheet">
          <link href="main2.css" rel="stylesheet">
      </head>
      

      Does main1.css have to be downloaded and parsed before main2.css can be fetched?

      • Yes
      • No

      No


      HTML:

      <head>
          <link href="main1.css" rel="stylesheet">
      </head>
      <body>
          <p>Paragraph 1</p>
          <p>Paragraph 2</p>
          <link href="main2.css" rel="stylesheet">
      </body>
      

      Does main2.css have to be downloaded and parsed before Paragraph 1 is rendered on the page?

      • Yes
      • No

      Yes


      What are some of the online tools and resources you use when you have a problem? Where do you go to ask questions?

      This question really just looks for how resourceful the candidate is, it also reflects on their problem solving process and may lead you to ask more questions.

      What is web a application?

      A great question to feel out the depth of the applicants knowledge and experience.

      A web application is an application utilizing web and [web] browser technologies to accomplish one or more tasks over a network, typically through a [web] browser.

      Must read: $(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 HTML page

      Coming up! My E-Book
    5. 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.