Preview

03 - Useful commands in HTML

 1. HTML ________________ are defined with the p tag (that is a 'p' in angle brackets)
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

  body parts

  heads

  paragraphs

  blocks

 2. HTML hyperlinks are defined with the ________tag: (which letter in angle brackets?)
HTMLTAGS.png

  a

  b

  l

  c

 3. What is missing from the following hyperlink creation in HTML?
<a href="https://www.testandtrack.io"> Do click here to visit the site

  a start a tag. It is missing the backslash (/)

  Nothing is missing

  A full stop at the end of the code.

  An ending 'a' tag - which should 'close' or 'end' the 'a' tag.

 4. In the following tag, what is 'img src' likely to stand for?
<!DOCTYPE html>
<html>
<body>

<h2>Welcome</h2>
<p>We hope you are enjoying learning HTML with testandtrack!</p>

<img src="testandtrack.jpg" alt="www.testandtrack.io" width="104" height="142">

</body>
</html>

  large source (e.g. hyperlinking a huge page)

  imaging sorcery (a type of creation of pixelated images using text)

  image source

  It is an error - there is no such tag

 5. In the following code, what are the numbers 104 and 142 referring to?
<img src="testandtrack.jpg" alt="www.testandtrack.io" width="104" height="142">

  They are referring to the size of the link:wwwtestandtrack.io

  They are referring to the width and height of the image being displayed on the page

  They are referring to the dimensions (size) of the word 'alt' on the page.

  They are referring to the width and height of the actual HTML page

 6. Analyse the following code. What will the button that is created on the page say inside it?
<!DOCTYPE html>
<html>
<body>

<h2>HTML Buttons</h2>
<p>HTML buttons are defined with the button tag:</p>

<button>Click me</button>

</body>
</html>

  HTML Buttons

  Button

  There is no button on the page as this has been done incorrectly

  Click me

 7. What is the difference between list 1 and 2 in this example?
<!DOCTYPE html>
<html>
<body>

<h2>This is List 1</h2>

<ul>
  <li>Coffee</li>
  <li>Apple</li>
  <li>Sugar</li>
</ul>  

<h2>This is list 2</h2>

<ol>
  <li>Coffee</li>
  <li>Apple</li>
  <li>Sugar</li>
</ol> 

</body>
</html>

  List 1 is un-ordered, and List 2 is ordered (has numbers before each item on the list)

  The first list is going to be displayed in alphabetical order

  The second list will not display at all as there is no such command as 'ol'

  There is no difference - both lists will be identical in display

 8. What does the br (in angle brackets) element do if added to some HTML code?
<!DOCTYPE html>
<html>
<body> 

<p>This is a paragraph.<br>This is also a paragraph<p>
</body>
</html>

  It draws a blank row line on the screen in the position it is coded

  It writes the letters 'br' to the screen.

  It displays a "black, round circle" (like a large full stop) on the screen

  It provides a line break. It will print the second paragraph on a new line

 9. Headings are defined with the h1 to h6 tags. The h6 tag is the biggest (most important) heading.
<!DOCTYPE html>
<html>
<body>

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

</body>
</html>

  FALSE

  TRUE

 10. Have you ever seen a Web page and wondered "Hey! How did they do that? You can see their code by ________________
googleviewsource.jpg

  right clicking the web page and selecting 'view source'

  pressing the ESCAPE key along with the number 7

  simply pressing enter several times until the code is revealed

  seeing your lawyer and asking for advice - it is illegal to do this