Preview

02 - Basic Page Structure and Setup

 1. In the following example the the html tag on line 2 should have a backslash inside it, before the 'h'
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

  TRUE

  FALSE

 2. HTML tags normally come in pairs. The first tag in a pair is the start tag, the second tag is the ________

  angular tab

   end tag

  second (but not the end) tag

  body tag

 3. The h1 element defines a large heading. The p element defines a _____________

  list

  point

  paragraph

  image or word beginning with 'p'

 4. The head element contains meta information about the document.

  FALSE

  TRUE

 5. What you put between the two title tags is what will come up as the very first large heading on the page (positioned on the right)

  TRUE

  FALSE

 6. Why is the Heading "My First Heading" smaller than the the paragraph text instead of being larger?
<!DOCTYPE html>
<html>
<head>
<title>THIS IS MY PAGE TITLE</title>
</head>
<body>

</h1>My First Heading<h1>
<p>My first paragraph.</p>

</body>
</html>

  Because it should be H1 without the angle brackets around it

  Because it starts with an ending h1 tag instead of a starting tag without the backslash

  Because it should be H1/(capitals followed by a hash) to start off the heading

  Because headings should always include a double H. e.g. /HH1

 7. What is one thing you need to change in order for all the paragraphs to be smaller in size than the first main heading?
<!DOCTYPE html>
<html>
<head>
<title>testandtrack.io</title>
</head>
<body>

<h1>TestandTrack.io<h1>
<p>My first paragraph.</p>
<p>My first paragraph.</p>
<p>My first paragraph.</p>
<p>My first paragraph.</p>
</body>
</html>

  Change all the 'p's in the code to 'p2's

  On line 8 (for the h1 tag) simply close the h1 tag by using a backslash (after the first angle bracket and before the 'h')

  Change h1 to h2

  It cannot be done without Javascript which is the language that deals with size

 8. Analyse the following html code. Which of of the following line is the second biggest in size (when displayed)?
<!DOCTYPE html>
<html>
<head>
<title>testandtrack.io</title>
</head>
<body>

<h1>TestandTrack.io</h1>
<p>I can't wait to do more tests!</p>
<p>This is another paragraph</p>
<h1>What will you do next?</h1>
<h2>See you soon</h2>
<p>Thanks and goodbye</p>


</body>
</html>

  TestandTrack.io

  See you Soon

  What will you do next?

  Thanks and goodbye

 9. Why won't the following code run?
<!DOCTYPE html>
<html>
<head>
<title>testandtrack.io<title>
</head>
<body>

<h1>TestandTrack.io</h1>

</body>
</html>

  Because the body tag has not been opened or closed correctly.

  Because all the tags should be in capital letters

  It will run! It will display "TestandTrack.io" to the screen

  the title tag has not got a backslash in it (i.e. it should be an 'ending' tag)

 10. From the following options, which line of code will correctly centre/center the text "TestandTrack.io"?
<!DOCTYPE html>
<html>
<head>
<title>testandtrack.io</title>
</head>
<body>

<center><h1>TestandTrack.io</h1><center>
<b><h1>TestandTrack.io</h1></b>
center<h1>TestandTrack.io</h1>center
<centre>TestandTrack.io</centre>
</body>
</html>

Option 1: center<h1>TestandTrack.io</h1>center

Option 2: <center><h1>TestandTrack.io</h1><center>

Option 3: <centre>TestandTrack.io</centre>

Option 4: <b><h1>TestandTrack.io</h1></b>

  Option 1

  Option 4

  Option 3

  Option 2

 11. The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them

  FALSE

  TRUE

 12. The browser does not display the HTML tags, but uses them to determine how to _______ the document

  display

  carve

  block

  repeat

 13. In the following example, only the content inside the body tags are displayed in a browser.
<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>

  TRUE

  FALSE

 14. Since the early days of the web, there have been many versions of HTML. What was developed in 2014 and still in use now?
Version	          Year
=======================
HTML	          1991
HTML 2.0	      1995
HTML 3.2	      1997
HTML 4.01	      1999
XHTML	          2000
_______?	      2014

  HTML5

  HTML4

  HTML7

  HTML6

 15. The !DOCTYPE declaration represents the document type, and helps browsers to display web pages correctly. It must __________________, at the top of the page (before any HTML tags)

  only appear once

  appear at least four times

  appear in capital letters, inside each p tag

  appear just twice