1. Home
  2. Explore
  3. Computer Science
  4. Website with HTML & CSS

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Website with HTML & CSS

  • 22Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Project Setup

What are the two files required to create the website as described in the tutorial?

22 questions

  1. 1

    What are the two files required to create the website as described in the tutorial?

    1. A

      index.html and style.css

    2. B

      index.html and script.js

    3. C

      index.html and website.css

    4. D

      home.html and style.css

    Correct answer
    A

    index.html and style.css

    Explanation

    The tutorial explicitly creates index.html for HTML and style.css for CSS, and links them together.

  2. 2

    Which HTML element is used as the main container for the entire webpage in the tutorial?

    1. A

      A div with the id 'main'

    2. B

      A div with the class 'container'

    3. C

      A section with the class 'main'

    4. D

      A div with the class 'main'

    Correct answer
    D

    A div with the class 'main'

    Explanation

    The tutorial creates

    as the outermost container within the body.

  3. 3

    How is the background image styled in the CSS for the .main class?

    1. A

      Using background-image and background-size: 100%

    2. B

      Using background-image with size cover and a linear-gradient overlay

    3. C

      Using background: url() with no-repeat and center

    4. D

      Using background-color with an image set in URL

    Correct answer
    B

    Using background-image with size cover and a linear-gradient overlay

    Explanation

    The .main class uses background: linear-gradient(to top, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.5) 50%), url(1.jpg); with background-size: cover and background-position: center.

  4. 4

    What is the purpose of the .navbar class in the tutorial?

    1. A

      To style the main content area of the webpage

    2. B

      To style the navigation bar containing the logo, menu, and search bar

    3. C

      To style the footer section

    4. D

      To style the login form container

    Correct answer
    B

    To style the navigation bar containing the logo, menu, and search bar

    Explanation

    The .navbar class contains the icon (logo), menu (navigation links), and search bar elements.

  5. 5

    Which CSS properties are used to position the logo (class .logo) inside the .icon div?

    1. A

      float: left, padding-left: 20px, padding-top: 10px

    2. B

      text-align: center, vertical-align: middle

    3. C

      position: absolute, left: 0

    4. D

      display: inline-block, margin: auto

    Correct answer
    A

    float: left, padding-left: 20px, padding-top: 10px

    Explanation

    In the CSS, .logo has float: left, padding-left: 20px, padding-top: 10px, and also color: orange and font-size: 35px.

  6. 6

    What HTML tag is used to create the navigation links (Home, About, Service, Design, Contact) in the tutorial?

    1. A

      Ordered list (

        ) with list items (
      1. ) containing span tags

    2. B

      A div with multiple anchor tags directly inside

    3. C

      A nav element with paragraph tags

    4. D

      Unordered list (

        ) with list items (
      • ) containing anchor tags ()

        [blocked]
    Correct answer
    D

    Unordered list (

      ) with list items (
    • ) containing anchor tags ()

      [blocked]

    Explanation

    The menu is created using

    • Home [blocked]
    • ...
    .

  7. 7

    How does the tutorial style the navigation menu list items to appear horizontally?

    1. A

      Using display: flex and justify-content: center on the ul

    2. B

      Using float: right on each li

    3. C

      Using display: inline on each li

    4. D

      Using grid layout on the navbar

    Correct answer
    A

    Using display: flex and justify-content: center on the ul

    Explanation

    The ul inside .menu is styled with display: flex, justify-content: center, and align-items: center to align items horizontally.

  8. 8

    What hover effect is applied to the anchor links in the navigation menu?

    1. A

      The text decoration changes to underline

    2. B

      The background color changes to orange

    3. C

      The color changes to orange

    4. D

      The font weight becomes lighter

    Correct answer
    C

    The color changes to orange

    Explanation

    The CSS rule a:hover in .menu sets color: orange.

  9. 9

    What is the class name of the search input field in the tutorial?

    1. A

      src

    2. B

      srcs

    3. C

      search-input

    4. D

      box

    Correct answer
    A

    src

    Explanation

    The tutorial uses .

  10. 10

    Which CSS property is used to round the top-left and bottom-left corners of the search input?

    1. A

      border-top-left-radius: 5px and border-bottom-left-radius: 5px

    2. B

      border-radius: 5px on the input

    3. C

      border-top-left-radius and border-bottom-left-radius

    4. D

      border-left-radius: 5px

    Correct answer
    C

    border-top-left-radius and border-bottom-left-radius

    Explanation

    The search input has border-bottom-left-radius: 5px and border-top-left-radius: 5px, while the button has border-top-right-radius and border-bottom-right-radius.

  11. 11

    What is the text content of the h1 element inside the .content div?

    1. A

      Web Design & Development & Course

    2. B

      Web Design & Development & Training

    3. C

      Web Design and Development Course

    4. D

      Web Design & Development & Program

    Correct answer
    A

    Web Design & Development & Course

    Explanation

    The tutorial writes:

    Web Design &
    Development
    Course

    .

  12. 12

    How is the span inside the h1 styled differently from the rest of the heading?

    1. A

      It has color: orange and font-size: 60px

    2. B

      It is bold and italic

    3. C

      It has a yellow background and larger font size

    4. D

      It is underlined and has a different font family

    Correct answer
    A

    It has color: orange and font-size: 60px

    Explanation

    The span is styled with color: orange and font-size: 60px, while the h1 has font-size: 50px and white color.

  13. 13

    What class is used for the 'JOIN US' button in the content section?

    1. A

      btn

    2. B

      cn

    3. C

      join

    4. D

      button

    Correct answer
    B

    cn

    Explanation

    The tutorial uses JOIN US [blocked].

  14. 14

    What CSS property is used to remove the underline from the anchor tag inside the '.cn' button?

    1. A

      link-style: none

    2. B

      text-decoration: 0

    3. C

      text-decoration: none

    4. D

      underline: none

    Correct answer
    C

    text-decoration: none

    Explanation

    The CSS for .content .cn a sets text-decoration: none.

  15. 15

    How is the login form positioned on the page?

    1. A

      Using flexbox with justify-content: flex-end

    2. B

      Using position: absolute with top: -20px and left: 870px

    3. C

      Using float: right with margin-right: 100px

    4. D

      Using position: fixed with top: 50px and right: 100px

    Correct answer
    B

    Using position: absolute with top: -20px and left: 870px

    Explanation

    The .form class uses position: absolute, top: -20px, left: 870px.

  16. 16

    What is the background style of the login form container?

    1. A

      A transparent background

    2. B

      A repeating pattern image

    3. C

      A solid orange background

    4. D

      A linear gradient from top with dark overlay

    Correct answer
    D

    A linear gradient from top with dark overlay

    Explanation

    The .form uses background: linear-gradient(to top, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.8) 50%);

  17. 17

    How are the border styles of the input fields inside the login form set?

    1. A

      All borders are 1px solid orange

    2. B

      No borders are applied

    3. C

      Only top border is 1px solid white

    4. D

      Only bottom border is 1px solid orange; top, right, left borders are none

    Correct answer
    D

    Only bottom border is 1px solid orange; top, right, left borders are none

    Explanation

    The inputs have border-bottom: 1px solid orange; border-top, border-right, border-left: none.

  18. 18

    What is the hover effect on the login button (class .btnn)?

    1. A

      Background becomes white and text color becomes orange

    2. B

      Text becomes bold

    3. C

      Background becomes dark gray

    4. D

      Background becomes orange and text color becomes white

    Correct answer
    A

    Background becomes white and text color becomes orange

    Explanation

    The .btnn:hover rule sets background: white and color: orange.

  19. 19

    Which social media icons are included in the tutorial?

    1. A

      LinkedIn, Facebook, Twitter, Google Plus, and GitHub

    2. B

      Facebook, Instagram, Twitter, Google, and Skype

    3. C

      Facebook, Snapchat, Instagram, Twitter, and Pinterest

    4. D

      Facebook, YouTube, WhatsApp, Twitter, and Instagram

    Correct answer
    B

    Facebook, Instagram, Twitter, Google, and Skype

    Explanation

    The tutorial includes ion-icons for Facebook, Instagram, Twitter, Google, and Skype.

  20. 20

    How are the social media icons styled to appear horizontally?

    1. A

      Each icon is inside a separate line with margin

    2. B

      They use CSS grid

    3. C

      They are positioned absolutely

    4. D

      They are placed inside a div with display: flex or float

    Correct answer
    D

    They are placed inside a div with display: flex or float

    Explanation

    The icons are inside a div with class 'icons' and styled with float or display: flex (implied by the code), but the tutorial does not explicitly set display: flex; however, the icons are inline elements by default with padding-left, so they appear side by side.

  21. 21

    What hover effect is applied to the social media icons?

    1. A

      The icon becomes transparent

    2. B

      The icon color changes to orange

    3. C

      The icon size increases

    4. D

      The icon background becomes orange

    Correct answer
    B

    The icon color changes to orange

    Explanation

    The CSS for .icons ion-icon:hover sets color: orange.

  22. 22

    What is the purpose of the 'transition' property used in several CSS rules in this tutorial?

    1. A

      To move elements from one position to another

    2. B

      To change the display property gradually

    3. C

      To rotate elements when hovered

    4. D

      To create smooth animation between state changes (e.g., hover)

    Correct answer
    D

    To create smooth animation between state changes (e.g., hover)

    Explanation

    The tutorial uses transition: 0.4s ease-in-out for menu links and transition: 0.3s ease for icons to smoothly change colors on hover.

Question 1 of 22
Question 1 of 22

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent