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>

  heads

  paragraphs

  blocks

  body parts

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

  b

  a

  c

  l

 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 full stop at the end of the code.

  Nothing is missing

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

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

 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>

  It is an error - there is no such tag

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

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

  image source

 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 width and height of the image being displayed on the page

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

  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

  Click me

  Button

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

 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>

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

  The first list is going to be displayed in alphabetical order

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

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

 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 displays a "black, round circle" (like a large full stop) on the screen

  It writes the letters 'br' to the screen.

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

  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'

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

  simply pressing enter several times until the code is revealed

  pressing the ESCAPE key along with the number 7