Preview

05 - Formatting Text in different ways

 1. The following formatting element makes text:
<b>

  small text

  italic

  emphasised

  bold

 2. The following formatting element makes text:
<i>

  small text

  italic

  bold

  emphasised

 3. The following formatting element makes text:
<em>

  emphasised

  small text

  subscript

  italic

 4. The following formatting element makes text:
<sub>

  italic

  subscript

  emphasised

  small text

 5. Which of the following options is the correct way to turn the text 'Click me' bold?
Option #1
=========

Click me <b>

Option #2
==========

<b>Click Me</b>

Option #3
==========

<b>Click Me<b>

Option #4
===========
<bold Click me /b>

  Option 1

  Option 4

  Option 2

  Option 3

 6. Analyse the HTML code in the snippet below. Which of the following statements is true.
<!DOCTYPE html>
<html>
<body>

<h1 style="background-color:DodgerBlue;">Hello World</h1>

<p style="background-color:Tomato;">
This is a long paragraph about nothing in particular and I do hope you are enjoying
learning about HTML. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
</p>

</body>
</html>

  The text 'Hello World' is Blue (Dodger Blue to be specific)

  The text starting with the words "This is a long parapgrah…." is blue and the background of the whole page is Tomato orange

  The text 'Hello World' is black and the background of the h1 heading is Blue

  The text is all white, and the background of the page is half blue and half tomato.

 7. Analyse the code below and decide whether this statement is true: "The first paragraph is Blue and the second is Green. The H3 heading is red"
<!DOCTYPE html>
<html>
<body>

<h3 style="color:Tomato;">Hello World</h3>

<p style="color:DodgerBlue;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>

<p style="color:MediumSeaGreen;">And I am the third paragraph</p>

</body>
</html>

  FALSE

  TRUE

 8. What does the following code do?
<h1 style="border:2px solid Violet;">Hello World</h1>

  Creates a violet coloured border around the H1 heading text 'Hello World'

  Turns the text of the H1 heading black and the border yellow

  Turns the H1 text 'Hello World' violet

  Turns the background of the H1 text violet and leaves it Black

 9. Read the following excerpt on HTML colour and fill in the blanks. To display the color _______, all color parameters must be set to 255
RGB Value
==========
In HTML, a color can be specified as an RGB value, using this formula:

rgb(red, green, blue)

Each parameter (red, green, and blue) defines the intensity 
of the color between 0 and 255.

For example, rgb(255, 0, 0) is displayed as red, because red is set 
to its highest value (255) and the others are set to 0.

To display the color black, all color parameters must be set to 0, 
like this: rgb(0, 0, 0).

To display the color _______, all color parameters must be set to 255, 
like this: rgb(255, 255, 255).

  Green

  Brown

  Blue

  White

 10. In HTML you can use font-family for text fonts and use font-size for text sizes
Example 1
==========
<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>


Example 2
==========
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>

  FALSE

  TRUE