Return To CS 100 Home

Colour Theme   Font Size Options
 
   
   
   

Practice Exercises

The following are optional practice exercises. They will not affect your mark in any way. You can either create new pages or do them on your testing pages


Linking to a Target on a Page

By default, the links we've taught you will just take you to the top of the page they are destined for within the same tab, but you can actually link to a certain part of that page, or even a part of the same page, and open a new tab or window. This is done with the target attribute.

  1. By default, the target attribute is set to "_self", which opens the link in the same tab. To open a new tab or window, simply set the target attribute on your link to "_blank"
     <a href="http://www2.cs.uregina.ca/~cs100/" target="_blank" > Open a link into a new tab </a>
    
  2. If you want to make a link go to a spot on the page, you will need to do two things:
    • Create an anchor on your page that the link will go to by specifying a name. This destination does not need to have text to click on.
      <a name="destination" ></a>
      
    • Create a link with that anchor as your target
       <a href="#destination" >Link to spot on page</a>
      
  3. If you want to combine the two and go to a specific target on a new page, you would need to add the target to the end of the destination page. For example, this link would go to the resizing section of our images tutorial from last week.
    <a href="http://www2.cs.uregina.ca/~cs100/lab_schedule/seminar3/img.php/#resize" target="_blank" > Example </a>
    

Footnotes and In-text Citations

While you are not required to use footnotes or in-text citations in this course, it is still a good idea to understand what they are and when to use them.

  1. A footnote is used to provide an explanation for a term, or a source that provides more information on a topic you have mentioned in your writing in case the reader wants to find more information. You would use these if you were citing a tertiary source, such as a Wiki, that had no formal author to quote. You should not use these for direct quotations.
  2. In-text citations, on the other hand, are used when the information is being attributed to a specific person, often in the form of direct quotations. Unlike footnotes, in-text citations should only refer to primary sources, and the reference information is included in the sentence structure.

It is important to note that standard HTML pages do not like quotation marks because of how data is encoded. In order to be able to use quotation marks, you need to include the tag

<meta charset="UTF-8" >

The article below has no reference information to verify it's claims. You will need to add some footnotes and citations.

  1. For the footnotes:
    • Use the superscript tag <sup> to place a 1 behind "Wubstep" in the first sentence, and a 2 behind "Smooth Weekly".
    • Make the superscript link to an anchor in the footnotes to help the user navigate to them (you may need to shrink the size of the page to make this work)
    • For the first footnote for Wubstep, write "A type of music that doesn't make sense"
    • For the second footnote for "Smooth Weekly," write them a fake web address so readers can find it and look for themselves
  2. For the citations, there are two quotes from Smooth Jazz, one in each paragraph. Add the citation information "(Jazz, 2019)" into the quotation. Remember, the citation and punctuation go outside the quotation marks.

A solution could look like this:

<meta charset="UTF-8" >
<h3>Super Wubtendo: The Console of Evildoers</h3>
<p>
Recently, the foolish inventors of Wubstep<sup><a href="#footnotes" >1</a></sup> have developed a new console, the Super Wubtendo, 
to propagate their mind-numbing music to our vulnerable children.  The games for 
this console feature gratuitous violence against saxophones and
other classic jazz instruments.  Local arcade expert Smooth  Jazz recounted to 
reporters, "I had just plugged my Super Wubtendo in, and was about to sit back with 
a nice can of Super Ultra, but before I could even press start the console
started emitting this horrible, ear-piercing racket.  There is absolutely nothing 
smooth about this console at all.  I had to rise straight out of my chair with lightspeed and 
toss that thing out the window" (Jazz, 2019).

</p>	
<p> Reviews on Smooth Weekly<sup><a href="#footnotes" >2</a></sup> tell a similar story, with ratings at record lows and 
a call from the community to boycott the console.  Fellow lovers of good music, if
 we all band together, we can deal a critical hit to the to our nemesis that
 will have echoes for years.  The only way I know we will beat this anxiety-inducing
attack is by starting a cyber fight with the company before they can launch another 
suckerpunch.  As Mr. Jazz said, "let us send them out with a bang" (Jazz, 2019).
</p>
<br><br>

<a name="footnotes" ></a>
<sup>1</sup> A type of music that does not make sense.<br>
<sup>2</sup> Smoothweeklyreviews.com.