CSS
Question 1
How do you center a text in CSS?
Solution: text-align: center
Question 2
Where in an HTML document is the correct place to refer to
an external style sheet?
Solution: In the <head> section
Question 3
Which CSS property is used to define the space between
characters in a text?
Solution: letter-spacing
Question 4
Which CSS property is used to change the font of an
element?
Solution: font-family
Question 5
In CSS, to define the space between the element's border
and content, you use the padding property, but are you
allowed to use negative values?
Solution: No
Question 6
How do you change the left margin of an element in CSS?
Solution: margin-left
Question 7
In CSS, "em", "%" and "pt" are
Solution: Measure units, but "em" and "%" are
relative, and "pt" is absolut
Question 8
How do you change the text color of an element?
Solution: color
Question 9
What are the methods for using CSS with a web page?
Solution: External, embedded, and inline
Question 10
Which property is used to change the background color of an
element?
Solution: background-color
Question 11
How do you display hyperlinks without an underline?
Solution: a {text-decoration:none}
Question 12
What is the correct XHTML for referring to an external style
sheet?
Solution: <link rel="stylesheet" type="text/css"
href="[Link]" />
Question 13
Which HTML tag is used to define an internal style sheet?
Solution: style
Question 14
Which CSS property is used to define the space between
words?
Solution: word-spacing
Question 15
What is the correct CSS syntax for making all the <p>
elements bold?
Solution: p {font-weight:bold}
Question 16
How do you make a list that lists its items with squares?
Solution: list-style-type: square
Question 17
What does CSS stand for?
Solution: Cascading Style Sheets
Question 18
How do you make the text bold in CSS?
Solution: font-weight:bold
Question 19
Which CSS property controls the text size?
Solution: font-size
Question 20
How do you insert a comment in a CSS file?
Solution: /* this is a comment */
Question 21
How do you make each word in a text start with a capital
letter?
Solution: text-transform:capitalize
Question 22
Which HTML tag is used to define an internal style sheet?
Solution: <style>
Question 23
How do you display a border like this:
- The top border = 10 pixels
- The bottom border = 5 pixels
- The left border = 20 pixels
- The right border = 1pixel?
Solution: border-width:10px 1px 5px 20px
Question 24
Which is the correct CSS syntax?
Solution: body {color:black}
Question 25
How do you add a background color for all "<h1>"
elements?
Solution: h1 {background-color:#FFFFFF}
HTML
Question 1
What is the correct HTML for making a checkbox?
Solution: <input type="checkbox" />
Question 2
How can you create an e-mail link?
Solution: <a href="[Link]
Question 3
How can you make a list that lists the items with bullets?
Solution: <ul>
Question 4
What two things do you need to create webpages & view
them?
Solution: A text editor and a web browser
Question 5
Which character entity would you use to display extra
spaces on a webpage?
Solution: & nbsp;
Question 6
What is the correct HTML for making a drop-down list?
Solution: <select>
Question 7
Which attribute is used to set inline styles for tags?
Solution: style
Question 8
What is the correct HTML for creating a hyperlink?
Solution: <a
href="[Link]
Question 9
What is the correct HTML for making a text area?
Solution: <textarea>
Question 10
Which tag is the root tag in HTML?
Solution: <html>
Question 11
What is the correct HTML tag for inserting a line break?
Solution: <br />
Question 12
What will be the output of this code?
<!-- display some text -->
<h1>Here is a heading</h1>
Solution: Here is a heading
Question 13
What does HTML stand for?
Solution: HyperText Markup Language
Question 14
Choose the correct HTML tag for the most important heading
Solution: <h1>
Question 15
What is the correct HTML for making a text input field?
Solution: <input type="text" />
Question 16
What is the correct HTML for inserting an image?
Solution: <img src="[Link]" alt="MyImage" />
Question 17
What does it mean when tags or attributes are said to be
deprecated?
Solution: They have become outdated and may
become obsolete in the future
Question 18
What is the HTML tag for a line separator?
Solution: <hr>
Question 19
Within the <map> tag, which tag is used to specify the
areas of the image that will act as a hotspot?
Solution: <area>
Question 20
Should < !DOCTYPE > declaration be the first thing in an
HTML document?
Solution: Yes, always
Question 21
To create a link to an anchor, which property in <a> tag is
used?
Solution: name
Question 22
Can tables be nested (table inside of another table)?
Solution: Yes
Question 23
Which of the following will display a password field in a
form?
Solution: <input type="password" name="pwd" />
Question 24
What is the tag for an inline frame?
Solution: iframe
Question 25
What file extension should HTML files have?
Solution: .html
Question 26
Which is correct?
Solution: <b>Click Here</b>
Question 27
Which tag is used to create paragraphs?
Solution: <p>
Question 28
Who is making the Web standards?
Solution: The World Wide Web Consortium
Question 29
How can you make a list that lists the items with numbers?
Solution: <ol>
Question 30
Which of these tags are all <table> tags?
Solution: <table><tr><caption>
Ques 1 :
Is it possible to link within the current page ?
(A) Only in framesets
(B) Yes
(C) No
(D) null
Answer : Yes
Ques 2 :
Which section is used for text and tags that are shown
directly on your web page ?
(A) Head
(B) Metatags
(C) Body
Answer : Body
Ques 3 :
Why should you add alternative text to your images ?
(A) In case the user wishes to load a different picture
(B) So the users can get an idea of what the image is before it loads
(C) So the user can save the image using the text as a name
Answer : So the users can get an idea of what the image is before it loads
Ques 4 :
What is used to store information usually relevant to
browsers and searchengines?
(A) Cookies
(B) Metatags
(C) Tabs
Answer : Metatags
Ques 5 :
Why should you specify a background color if you are
using an image for the actual background of your
page ?
Answer : The background color will be shown until the image loads
Ques 6 :
What tag tells the browser where the page starts and
stops ?
(A) < body >
(B) < head >
(C) < html >
Answer : < html >