Website with HTML & CSS
- 22Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What are the two files required to create the website as described in the tutorial?
What are the two files required to create the website as described in the tutorial?
22 questions
- 1
What are the two files required to create the website as described in the tutorial?
- A
index.html and style.css
- B
index.html and script.js
- C
index.html and website.css
- D
home.html and style.css
Correct answer
Aindex.html and style.css
Explanation
The tutorial explicitly creates index.html for HTML and style.css for CSS, and links them together.
- A
- 2
Which HTML element is used as the main container for the entire webpage in the tutorial?
- A
A div with the id 'main'
- B
A div with the class 'container'
- C
A section with the class 'main'
- D
A div with the class 'main'
Correct answer
DA div with the class 'main'
Explanation
The tutorial creates
as the outermost container within the body. - A
- 3
How is the background image styled in the CSS for the .main class?
- A
Using background-image and background-size: 100%
- B
Using background-image with size cover and a linear-gradient overlay
- C
Using background: url() with no-repeat and center
- D
Using background-color with an image set in URL
Correct answer
BUsing 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.
- A
- 4
What is the purpose of the .navbar class in the tutorial?
- A
To style the main content area of the webpage
- B
To style the navigation bar containing the logo, menu, and search bar
- C
To style the footer section
- D
To style the login form container
Correct answer
BTo 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.
- A
- 5
Which CSS properties are used to position the logo (class .logo) inside the .icon div?
- A
float: left, padding-left: 20px, padding-top: 10px
- B
text-align: center, vertical-align: middle
- C
position: absolute, left: 0
- D
display: inline-block, margin: auto
Correct answer
Afloat: 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.
- A
- 6
What HTML tag is used to create the navigation links (Home, About, Service, Design, Contact) in the tutorial?
- A
Ordered list (
- ) with list items (
- ) containing span tags
- B
A div with multiple anchor tags directly inside
- C
A nav element with paragraph tags
- D
Unordered list (
- ) with list items (
- ) containing anchor tags () [blocked]
Correct answer
DUnordered list (
- ) with list items (
- ) containing anchor tags () [blocked]
Explanation
The menu is created using
.- Home [blocked] ...
- A
- 7
How does the tutorial style the navigation menu list items to appear horizontally?
- A
Using display: flex and justify-content: center on the ul
- B
Using float: right on each li
- C
Using display: inline on each li
- D
Using grid layout on the navbar
Correct answer
AUsing 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.
- A
- 8
What hover effect is applied to the anchor links in the navigation menu?
- A
The text decoration changes to underline
- B
The background color changes to orange
- C
The color changes to orange
- D
The font weight becomes lighter
Correct answer
CThe color changes to orange
Explanation
The CSS rule a:hover in .menu sets color: orange.
- A
- 9
What is the class name of the search input field in the tutorial?
- A
src
- B
srcs
- C
search-input
- D
box
Correct answer
Asrc
Explanation
The tutorial uses .
- A
- 10
Which CSS property is used to round the top-left and bottom-left corners of the search input?
- A
border-top-left-radius: 5px and border-bottom-left-radius: 5px
- B
border-radius: 5px on the input
- C
border-top-left-radius and border-bottom-left-radius
- D
border-left-radius: 5px
Correct answer
Cborder-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.
- A
- 11
What is the text content of the h1 element inside the .content div?
- A
Web Design & Development & Course
- B
Web Design & Development & Training
- C
Web Design and Development Course
- D
Web Design & Development & Program
Correct answer
AWeb Design & Development & Course
Explanation
The tutorial writes:
Web Design &
.
Development
Course - A
- 12
How is the span inside the h1 styled differently from the rest of the heading?
- A
It has color: orange and font-size: 60px
- B
It is bold and italic
- C
It has a yellow background and larger font size
- D
It is underlined and has a different font family
Correct answer
AIt 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.
- A
- 13
What class is used for the 'JOIN US' button in the content section?
- A
btn
- B
cn
- C
join
- D
button
Correct answer
Bcn
Explanation
The tutorial uses JOIN US [blocked].
- A
- 14
What CSS property is used to remove the underline from the anchor tag inside the '.cn' button?
- A
link-style: none
- B
text-decoration: 0
- C
text-decoration: none
- D
underline: none
Correct answer
Ctext-decoration: none
Explanation
The CSS for .content .cn a sets text-decoration: none.
- A
- 15
How is the login form positioned on the page?
- A
Using flexbox with justify-content: flex-end
- B
Using position: absolute with top: -20px and left: 870px
- C
Using float: right with margin-right: 100px
- D
Using position: fixed with top: 50px and right: 100px
Correct answer
BUsing position: absolute with top: -20px and left: 870px
Explanation
The .form class uses position: absolute, top: -20px, left: 870px.
- A
- 16
What is the background style of the login form container?
- A
A transparent background
- B
A repeating pattern image
- C
A solid orange background
- D
A linear gradient from top with dark overlay
Correct answer
DA 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%);
- A
- 17
How are the border styles of the input fields inside the login form set?
- A
All borders are 1px solid orange
- B
No borders are applied
- C
Only top border is 1px solid white
- D
Only bottom border is 1px solid orange; top, right, left borders are none
Correct answer
DOnly 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.
- A
- 18
What is the hover effect on the login button (class .btnn)?
- A
Background becomes white and text color becomes orange
- B
Text becomes bold
- C
Background becomes dark gray
- D
Background becomes orange and text color becomes white
Correct answer
ABackground becomes white and text color becomes orange
Explanation
The .btnn:hover rule sets background: white and color: orange.
- A
- 19
Which social media icons are included in the tutorial?
- A
LinkedIn, Facebook, Twitter, Google Plus, and GitHub
- B
Facebook, Instagram, Twitter, Google, and Skype
- C
Facebook, Snapchat, Instagram, Twitter, and Pinterest
- D
Facebook, YouTube, WhatsApp, Twitter, and Instagram
Correct answer
BFacebook, Instagram, Twitter, Google, and Skype
Explanation
The tutorial includes ion-icons for Facebook, Instagram, Twitter, Google, and Skype.
- A
- 20
How are the social media icons styled to appear horizontally?
- A
Each icon is inside a separate line with margin
- B
They use CSS grid
- C
They are positioned absolutely
- D
They are placed inside a div with display: flex or float
Correct answer
DThey 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.
- A
- 21
What hover effect is applied to the social media icons?
- A
The icon becomes transparent
- B
The icon color changes to orange
- C
The icon size increases
- D
The icon background becomes orange
Correct answer
BThe icon color changes to orange
Explanation
The CSS for .icons ion-icon:hover sets color: orange.
- A
- 22
What is the purpose of the 'transition' property used in several CSS rules in this tutorial?
- A
To move elements from one position to another
- B
To change the display property gradually
- C
To rotate elements when hovered
- D
To create smooth animation between state changes (e.g., hover)
Correct answer
DTo 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.
- A

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