HTML/CSS MCQs – Multiple Choice Questions and Answers – Part 5
Multiple choice questions and answers (MCQs) on HTML/CSS to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as tags, web standards, CSS selector, objects, and more. This quiz will easily prepare anyone to pass their online test.
1. DNS translates __________
A the domain name as IP address
B IP address as a domain name
C Both A and B are true.
D the domain name as physical address (MAC)
[st_adsense]
2. Which tag is used to list items with bullets?
A <bullet>…</bullet>
B <list>…</list>
C <ul>…</ul>
D <ol>…</ol>
<ul> <li>JavaScript</li> <li>HTML / CSS</li> <li>PHP</li> </ul>
3. How to define a link that should open in a new page in HTML?
A <a href = “https://stackhowto.com” target = “blank”>Click Here</a>
B <a href = “https://stackhowto.com” target =“_blank”>Click Here</a>
C <a href = “https://stackhowto.com” target = “#blank”>Click Here</a>
D <a href = “https://stackhowto.com” target = “@blank”>Click Here</a>
4. How to define a background image for a web page?
A <body background = “test.jpg”>
B <body background image = “test.jpg”>
C <background = “test.jpg”>
D <background image = “test.jpg”>
5. The first page of a website is called _____.
A Design page
B Home page
C Front page
D Main page
[st_adsense]
6. The Head tag is used for?
A Writing CSS styles
B Writing Javascript
C Including CSS and JS files
D All the answers are true
7. By default, links are displayed with an underline. How can you remove the underline from all links using CSS code?
A a {text: no-underline;}
B a {text-decoration:none;}
C a {text-style: no-underline;}
D a {text-decoration: no-underline;}
8. What is the correct syntax of the following CSS code?
A Body:color=black
B {body;color:black}
C {body:color=black(body}
D Body {color: Black}
[st_adsense]
9. Which of the following selectors selects all E elements with the attribute Attr that ends with the given value?
A E[attr^=value]
B E[attr$=value]
C E[attr*=value]
D None of the above
10. Which of the following selectors selects the checkboxes that is checked or enabled?
A E ~ F
B ::after
C :checked
D None of the above
<input type="checkbox"> Lorem Ipsum<br> <input type="checkbox"> Lorem Ipsum<br> <input type="checkbox" checked="checked"> Lorem Ipsum<br> <input type="checkbox"> Lorem Ipsum
input:checked { height: 50px; width: 50px; }
Output:
[st_adsense]