Showing posts with label Firefox. Show all posts
Showing posts with label Firefox. Show all posts

Monday, March 12, 2012

NED11: Module 3

Notes from Unit Outline
In the real world people can see where they are going because we are surrounded by navigational clues like signs, maps, sounds, smells, colours and climates. However on the Internet, it is very easy to get lost. You have a very little sense of where you are. Think about your Internet use yesterday. Is it easy to remember the sites you stumbled across? What navigational tools do you use to help you find your way?

It is important to make your website easy to learn - transparent and obvious to your users because you only have one chance to make a first impression! Navigation should be consistent across pages within your website. If you move your navigation from one page to the next, people will get lost. Don't remove the page they are on from the tabs, but dim it so they know where they are.

If you're building a site for a large corporation with many departments, try using multiple sub-sites. Check IBM for an example. Colour coded sections and roll-overs are a good way of providing feedback to users. Koodoz has very interesting navigational links. A 'back' button doesn't necessarily take the reader back a page - they may have arrived at that page from elsewhere. It is important to provide a 'home' button instead. If your navigation doesn't stand out from the rest of your content - it won't be very clear. It must be noticed and obvious! It is crucial that you understand your audience.

Tutorial Exercise: Style Sheet Basics
We were asked to install the Web Developer Tools extension for Mozilla FireFox. I did that and played around with the CSS enabling and disabling. It was interesting to see how a page's appearance changes when you alter the CSS style sheet.

What I've learnt about HTML, XHTML and CSS so far


HTML:
  • In HTML hidden code should be written like <!--like this. This text cannot be seen by the browser, only by you and others who are reading the code-->
  • Instead of hand-writing html - the program Dream Weaver by Creative Suite does it
  • Tag + content + tag = element
  • 6 different heading types are permitted: <h1>, <h2>...<h6>
  • An href element contains a hyperlink to either an internal folder or external URL
  • An img src element contains a link to an image
  • The root folder is the top level folder of your website - the folder to which every page on your website links back to. The index is the 'home' page
  • Relative paths link pages within the same website while URL's link to other websites
  • Title attribute = when you hover your mouse over a link and a small flag pops up telling you something about that link
  • To link to a specific spot on a webpage, use the id attribute and anchor points
  • Most people view links BEFORE content
  • Block elements are elements that stand on their own, like <h1>, <p> and <blockquotes> They add a line break below (sometimes above)
  • Inline elements are those which flow on the same line like <q>, <a> and <em>
  • <br> and <img> are empty elements - they don't need a closing tag
  • Nesting refers to elements nested inside other elements
  • As a coder you should use special characters instead of numbers, entities and symbols so all browsers display the text correctly. Numbers, entities and special characters can be found here
  • Lists <li> can be ordered <ol> or unordered <ul> and don't need to begin at the number 1. To start a list at 100, for example, the html would be entered like this:
<ol>
<li value="100">Coffee</li>
<li>Tea</li>
</ol>
  • jpegs are best used for complex graphics and graphics with colour (like photos)
  • gifs are best for single or 2 colour images, like logos and are best for transparent backgrounds
  • A document type tells the browser which version of html you're using
  • Meta tags tell the browser the content type of the file and the kinds of characters used to encode it
XHTML:
  • The 'X' in XHTML stands for extensible
  • XML is extensible markup language
  • Using XHTML means that screen readers are able to view browsers correctly, as are mobile devices and many different browsers
  • More so than ever, it is important to convert all special characters to entities using this guide here
  • Empty tags need to be closed now. So the regular old <br> tag now becomes < /br> with a space before the slash
  • A paragraph cannot contain a list any longer
  • <ol>, <ul> and <p> are block elements so cannot use one within the other, i.e. a list will now look like this:
<p>This is a list</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
  • <img src> must go inside a <p> now, must have an alt attribute and a closing tag, e.g.
<img src="images/segway2.jpg" alt="segway2" />
  • An href tag needs to go inside a <p>, i.e.
<p>
<a href="../lounge.html">Back to the lounge< /a>
</p>

CSS:
  • In CSS hidden code should be written like /*like this. This can only be seen by code readers. It does not show in the browser*/
  • An example of read-baked CSS may look like:
<style type="text/css">
body {
background-color: #d2b48c;
margin-left: 20%;
border: 1px dotted gray;
padding: 10px 10px 10px 10px;
font-family: sans-serif;
}
</style>
  • CSS code must go within the <head> in html
  • To change a heading to gray sans serif, the code looks like this:
h1 {
font-family: sans-serif; color: gray;
}
  • To change a paragraph background colour to red, the code looks like this:
p {
background-color: red;
}
  • From the above examples it is clear that CSS looks different than html. Gone are the <tags> and {braces} replace them
  • You can change all paragraphs to the red background using the code above like you can change all heading 1's into tray sans serif just by entering the code once. You don't' have to individually code ever paragraph or every heading 1
  • You can have as many rules as you want for each element, e.g. you can tell a h1 to be maroon sans-serif 14pt font and underline all at the same time
  • All CSS can be entered within the <head> of the html document, HOWEVER it is best practice to create your own CSS style sheet which is a separate document to the html code. That way when you have a multi-page website and need to change background colours, text colours, fonts etc, you can simply make one change...in the CSS document rather than have to change every page individually
  • To tell a browser to find a style sheet, you enter this code within the head:
<link type="text/css" rel="stylesheet" href="filename.css" />

      Sunday, February 26, 2012

      NED11: Module 2

      Notes from Unit Outline
      When the internet was first established the four most common utilities were Email, Newsgroups (Usenet), Telnet (command line interface) and FTP (file transfer protocol).

      The World Wide Web was invented by Tim Berners-Lee and released in 1991. Here is the world's very first web page.

      Gopher was introduced around the same time by Paul Lindner and Mark P McCahill at the University of Minnesota. It was the first internet hypertext system - and only text. Here is the last remaining Gopher entry point.

      The WWW was initially used in the form of text-only interface due to modem speeds, however now with faster internet speeds, images and other data can transfer much faster.

      Every computer has it's on IP address and every website has it's own URL (uniform resource locator). Here is quite a bit of information on the history and the purpose of URL's. Let's break down a URL to understand it better. Take a look at this URL:

      http://www.curtin.edu.au/curtin/dept/design/index.html

      http = protocol
      www = server name
      curtin = domain name
      edu = type
      au = country
      curtin = directory
      dept = sub directory
      design = sub directory
      index.html = file name.

      To register a domain name in Australia - there are many sites to do this. This is one. This is the one I used to register mine. To register international domains you can use this one, but there are many. A simple Google search will show many many results. The Internet Corporation for Assigned Names and Numbers shows the 'type' extensions, why and when they were all created.

      Web Design Basics:
      To begin building a website using html code, you need a text editing program. As I use a Mac computer, I downloaded the free Text Wrangler. There are many available. Google 'text editing program' and there are many free and paid versions.

      In addition to using a text editor, it is a good idea to test your coding in more than one browser. I use the default browser, Safari and also downloaded Mozilla FireFox for Mac. The beauty of FireFox is you can also download additional plug-ins which are great for designers. I particularly like the add-on called ColorZilla. When you come across a colour on a webpage that you like - click on the ColorZilla tool, click on the colour and the html colour number is saved to a clipboard. Then when you return to your text editor to change the colour of your font or background - you have the html colour number ready to insert.

      Here is an image of some html coding in Text Wrangler:

      Here is what the above html code looks like in Safari:

      And here it is in FireFox:

      If you look closely you will see a difference between how the Safari browser displays the html code to the FireFox browser. The html code is identical with the exact same font type and font size, however it DOES look different. For interest's sake - have a look at this blog in more than one browser. It should differ in appearance - maybe a slight colour variation or font type or size. The more browsers you can test your coding in - the better! This exercise is taken from our textbook 'Head First HTML and CSS' by Freeman and Freeman. I will be working my way through this text book during NED11.

      So what exactly is HTML?
      HTML documents are plain-text (also known as ASCII) files that can be created using any text editor (e.g., Emacs or vi on UNIX machines; BBEdit on a Macintosh; Notepad on a Windows machine). You can also use word-processing software if you remember to save your document as "text only with line breaks." (Information courtesy of http://www.put.com/HTMLPrimer.html).

      Here is a very brief example of necessary html code required for a website:
      <html>
          <head>
          <TITLE>A Simple HTML Example</TITLE>
          </head>
          <body>
          <H1>HTML is Easy To Learn</H1>
          <P>Welcome to the world of HTML. 
          This is the first paragraph. While short it is 
          still a paragraph!</P>
          <P>And this is the second paragraph.</P>
          </body>
          </html>

      If you want to learn html, there are many tutorials online. I would suggest starting with the W3 Schools.  This is also another good beginner's guide.

      Exercise 1: Web Design Basics
      1. The above code contains tags which make up the basic structure of an html document
      2. The <p> tag denotes the start of a paragraph
      3. The difference between a <p> tag and a <br> tag is that a <p> tag puts a line break above and below the text - similar to starting a paragraph. Whereas the <br> tag only does one line break below the text
      4. To create a bulleted list you use these tags: <ul> <li> and </ul>. The <ul> tag means unordered list and <li> means list
      5. To create a numbered list you use these tags: <ol> <li> and </ol>. The <ol> tag means ordered list
      6. When you open your browser and go to a website you will notice a title in the browser header (or the tab header if you use tabs). Look up! See the name of this blog in the browser title? This title is provided in the html coding in this way <title>Blogger: Internet Design Units</title>
      7. To add an image to html coding the required element (or tag) is <imgsrc="nameofimage.jpg">
      8. To add a link to html coding the required element is: <a href="URLhere">
      9. To make an image a clickable link you need to put the <img> element inside the <a> element. You need the URL of the site you want the image to take you to when clicked on AND the location of the image file. The code is entered like so: <a href="sitetogotowhenclicked"><img src="locationofimage.jpg"></a>. Don't forget to close your a href element with </a>
      10. The coding required to make a table 3 columns x 4 rows is:
      <table>
      <tr>
      <td>row 1 column 1</td>
      <td>row 1 column 2</td>
      <td>row 1 column 3</td>
      </tr>
      <tr>
      <td>row 2 column 1</td>
      <td>row 2 column 2</td>
      <td>row 2 column 3</td>
      </tr>
      <td>row 3 column 1</td>
      <td>row 3 column 2</td>
      <td>row 3 column 3</td>
      </tr>
      </table>

      Definitions:
      <table> begins the table and </table> ends the table.
      <tr> is the beginning of a table row while </tr> ends the table row.
      <td> is the table data cell. This is where the actual information is entered. </td> ends the table data cell.

      Exercise 2: HTML Introduction
      1. To provide invisible information in a html document, you type the element: <!--hidden text here-->
      2. Spaces between words should be entered as %20 so they are displayed properly. It is also important to ensure you use <br> and <p> effectively so your text appears as the browser exactly as you typed it in the html document
      3. You can provide additional information in your html document in the form of a small pop-up message when you hover your mouse over it. The tag is written like so: <img src="urlofimage.gif" alt="here is the pop-up message">
      4. You can create a link that jumps to a different section of the same page by using the <a> element as a landing point. There are three steps to this. Firstly find the location on the page where you would like the landing point to be (like a heading) and wrap a short piece of text in an <a> element. Then choose a name for this section of text like "jump to here" and insert an id attribute into the point you want to jump FROM, like so: <a href="URLofpagewithlandingpoint.com#landingpoint"FROM HERE</a>. This lesson on w3schools shows an example
      5. To show a table with empty cells you need to indicate the border width like so: <table border="1">. This creates a table with a border thickness of 1. The higher the number - the thicker the border
      6. To turn an image into a hypertext link you need to embed the URL of the image within the <a href> element. You can add a border around the image by using the element <img border="3" src="image" alt="URL" width="32" height="32"/>. Once again, the higher the number - the thicker the border
      7. To change the colour of hypertext links use this tag: <body link=#ff0000>. This will change all links to the colour red.
      8. To change the background colour of text, you need to add this html: p style="background-color:#FFFF00">. The colour is determined using the HEX value. HEX means the number used to identified colours used on the internet. Here are the HEX values of all colours.
      A very useful tag:
      To add an 'email to' link to a webpage, use the following tags within the body of html:
          <p>
          This is an email link:
          <a href="mailto:someone@example.com?Subject=Hello%20again">
          Send Mail</a>
          </p>