D.J.Mcshee's Web Design Quiz Part I: Basic Xhtml & CSS

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By D.j.mcshee
D
D.j.mcshee
Community Contributor
Quizzes Created: 1 | Total Attempts: 462
Questions: 10 | Attempts: 462

SettingsSettingsSettings
CSS Quizzes & Trivia

Quiz on the basics of XHTML and CSS; questions will be on the code, syntax etc
(To make the XHTML questions display correctly I have had to put spaces in the beginning and the end of the tags!)


Questions and Answers
  • 1. 

    XHTML: Which of these answers will place a horizontal rule between two paragraphs?

    • A.

      < p >paragraph< /p > < br / > < p >another paragraph< /p >

    • B.

      < p >paragraph< /p > < hr / > < p >another paragraph< /p >

    • C.

      < p >paragraph< /p > < p >another paragraph< /p > < hr / >

    • D.

      < hr / > < p >paragraph< /p > < p >another paragraph< /p >

    • E.

      < br / > < p >paragraph< /p > < p >another paragraph< /p >

    Correct Answer
    B. < p >paragraph< /p > < hr / > < p >another paragraph< /p >
    Explanation
    The correct answer is the first option. This is because it includes the tag between the two paragraphs, which will create a horizontal rule.

    Rate this question:

  • 2. 

    CSS: This code changes the color of the background and the text, but what is missing?body {     ________________: #FFFFFF;     Color: #000000;}

    Correct Answer
    background-color
    Explanation
    The given code is missing the property name "background-color" before the colon. To change the color of the background, the correct syntax should be "background-color: #FFFFFF;".

    Rate this question:

  • 3. 

    XHTML: Which of these tags will make a sample of text become Italic?

    • A.

      < b >italic text< /b >

    • B.

      < li >italic text < /li >

    • C.

      < p >italic text< /p >

    • D.

      < i >italic text< /i >

    • E.

      < strong >italic text< /strong >

    Correct Answer
    D. < i >italic text< /i >
    Explanation
    The correct answer is italic text. The tag is used in XHTML to make text appear in italics.

    Rate this question:

  • 4. 

    XHTML: Which of these tags will make a sample of text become Bold?

    • A.

      < b >bold text< /b >

    • B.

      < li >bold text< /li >

    • C.

      < p >bold text< /p >

    • D.

      < i >bold text< /i >

    • E.

      < strong >bold text< /strong >

    Correct Answer
    A. < b >bold text< /b >
    Explanation
    The tag is used to make text bold in XHTML. In the given answer, the text "bold text" is enclosed within the tags, indicating that it should be displayed in bold.

    Rate this question:

  • 5. 

    CSS: Which of these samples of code will create a div box called Header with a width of 100px?

    • A.

      Header { width: 100px; }

    • B.

      #Header { width: auto; }

    • C.

      #Header { width: 100px; }

    • D.

      #Header ( WIDTH: 100px; )

    Correct Answer
    C. #Header { width: 100px; }
    Explanation
    The correct answer is "#Header { width: 100px; }" because it uses the CSS ID selector (#) to target the element with the ID "Header" and sets its width to 100px.

    Rate this question:

  • 6. 

    CSS: Which of these properties will create a space on the outside of a div box?

    • A.

      #Header { padding: 5px; }

    • B.

      #Header { margin: 5px; }

    Correct Answer
    B. #Header { margin: 5px; }
    Explanation
    The correct answer is #Header { margin: 5px; }. The margin property in CSS creates space on the outside of a div box. In this case, the margin value is set to 5 pixels, which will create a 5-pixel space around the div box with the id "Header". The padding property, on the other hand, creates space on the inside of the div box.

    Rate this question:

  • 7. 

    XHTML: This code changes the colour of the background to grey, but what is missing?< html >< head >< /head >< body _______="#777777" >< /body >< /html >

    Correct Answer
    bgcolor
    Explanation
    The correct answer "bgcolor" is missing from the code. In XHTML, the "bgcolor" attribute is used to specify the background color of the body element. Without this attribute, the code will not be able to change the color of the background to grey.

    Rate this question:

  • 8. 

    XHTML: Which of these samples create a un-ordered list?

    • A.

      < ul > < li >Item 1< /li > < li >Item 2< /li > < li >Item 3< /li > < /ul >

    • B.

      < ol > < li >Item 1< /li > < li >Item 2< /li > < li >Item 3< /li > < /ol >

    • C.

      < ul > < li "Item 1" / > < li "Item 2" / > < li "Item 3" / > < /ul >

    • D.

      < ol > < li "Item 1" / > < li "Item 2" / > < li "Item 3" / >

    Correct Answer
    A. < ul > < li >Item 1< /li > < li >Item 2< /li > < li >Item 3< /li > < /ul >
    Explanation
    The correct answer is the first option, which is: < ul >
    < li >Item 1< /li >
    < li >Item 2< /li >
    < li >Item 3< /li >
    < /ul >

    This is because the < ul > tag is used to create an unordered list in XHTML. The < li > tags within the < ul > tag represent the list items.

    Rate this question:

  • 9. 

    CSS: Which of these samples of code will remove the underline from hyperlinks?

    • A.

      A { list-style-type: none; }

    • B.

      A { text-decoration: no-underline; }

    • C.

      A ( text-decoration: none; )

    • D.

      A ( list-style-type: none; )

    • E.

      A { text-decoration: none; }

    Correct Answer
    E. A { text-decoration: none; }
    Explanation
    The correct answer is "a { text-decoration: none; }". This CSS code will remove the underline from hyperlinks by setting the text-decoration property to none for the "a" selector.

    Rate this question:

  • 10. 

    CSS: Which of these samples of code will apply a 5px solid border to a div?

    • A.

      #Header { border: 5px solid; }

    • B.

      #Header { border: solid; }

    • C.

      #Header { border: 5px dotted; }

    • D.

      #Header { border: "solid"; }

    • E.

      #Header { border: 5px "solid"; }

    Correct Answer
    A. #Header { border: 5px solid; }
    Explanation
    The correct answer is #Header {
    border: 5px solid;
    }

    This code will apply a 5px solid border to a div with the id "Header". The "border" property is used to set the width, style, and color of the border, and in this case, it is set to 5px width and solid style.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 18, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 23, 2009
    Quiz Created by
    D.j.mcshee
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.