<img> element

img is an empty element it has no closing tag.  the image information goes in as an attribute.  An example might be

<img src="/jm1/images/BlueFlower.jpg" alt="A blue flower" title="Blue flowers of Brisbane" />

the attributes are

  • src which tells the browser where to find the image file. 
  • alt provides a text description of the image if the image cannot be shown. This is used by screen reader software and search engines.  Should be an accrate description of the image content. The quotes can be left empty if no additional information is provided.
  • title can be used to provide additional information about the image. The quotes can be left empty if no title is provided.

Additional attributes can be used:

  • width="22 "  where the number is the number of pixels across for the image
  • height="22" where the number is the number of pixels tall for the image

height and width is being specified in css presently.

An image can be placed anywhere in the code.  At the beginning, middle or end of text.

Image resolution should be at 72 pixels per inch.

Transparent GIFs allow for 100% transparency.

PNGs allow diagonal or rounded edges or semi-opaque transparency or drop-shadows.


 <figure> new to HTML5

<figure> allows the image and the caption to be grouped together or be associated.  There can be more then one image inside the <figure> as long as they share the same caption.


   <img="image/BlueFlower.jpg" alt="A blue flower" title="The blue flowers of Brisbane"  


<figcaption>The blue flowers of Brisbane cover the slopes of the mountains in Brisbane in the spring.</figcaption>


Comments (0)

There need to be a target tag and a link tag.

The target tag might look like this


<a id='top'><a>

with content between the two <a>

The link tag might look like this

<a href="#top">Go to Top</a>


The  link only works if the user is far enough down the page that they would otherwise have to scroll up to the top of the page.


links are created using the <a href="http://...>text the user will see to click on</a>   The link text goes between the opening <a> and the closing </a>

href attributes

     The full url takes one to another website href="http://lindahagen.com"

      Within a web site you can use a relative url 

             If the page is in the same folder then use the name of the file.

             If the page is in a different folder then within that folder the sub-folders would be listed.  href="/jm1/image/BlueFlower.jpg"  This file is in a image is a sub-folder of lindahagen.   href="/jm1/image/flower/BlueFlower.jpg"  is in a sub-sub-folder of lindahagen (lindahagen->image->flower)

             If the page is in a different folder that is not the sub-folder of the folder being referenced then ../ is used for every folder level one wants to go up. 


  To use a specific email address to mail to the href references a mailto:  href="mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.">email to John doe</a>  this opens up the email program in compose or new.



Adding the attribute of target to the element allows one to decide if it should be in the same window, new window or new tab.

A new window would be <a href="http:/www.lindahagen.com" target="_blank">new window</a>

To open over the site leave off the target <a href="http://www.lindahagen.com" target="_self">same window</a>

To open in a new tab <a href="http:/www.lindahagen.com" target="tab">new tab</a>  not sure if this will work.



 The id  attribute used to target any HTML element within a page that can be linked to.  It is used to link within a page.  It has to start with a letter. No two attributes can have the same value.   Such as <h1 id="top">title</h1>.  The <a> element is used to link with the id.  The href in the <a> starts with a #.  Thus, <a href="#top">Go to top of page</a> with take one to where the id="top".

If the link to a specific part of a page is on another page the href would look like following:  

<a href=http://lindahagen.com/#top">  or if on the same website same folder href="/jm1/images/BlueFlower.jpg"/#top"> or may use ../


Comments (0)

There are three types of lists

  1. Ordered Lists - items are numbered  Order lists start and end with <ol>    then the list starts <li>  item </li>  <li> item </li>  end list items </ol>
  2. Unordered lists - items ordering does not matter. They have a bullet or symbol in front of each item.  I.c. grocery list Unorder lists start with <ul> then the items <li> item </li>  <li> another item </li> then end of list </ul>
  3. Definition lists - set of terms with definitions  This list type uses different notation.  It is defined with the <dl> notation and the <dt> notation for the term and the <dd> for the definition .  <dl>  then <dt> term </dt> <dd> the definition </dd> <dl>   There may be more then one term <dt> </dt> between the <dl> </dl>

Lists can be nested within lists.



Comments (0)

The four statement for connecting to the mysql database using php are

  1. mysql_connect()  to connect to the server
  2. mysql_select_db()   selects the specific data base to connect to
  3. mysql_query()    sends and sql statement to the server
  4. mysql_fetch_array()  returns the data from the server

One can also use mysqli commands which allows one to one more then one database at a time. The mysqli are the improved mysql functions.  They have more capability then the start mysql functions such as with mysqli you can open more then one database at a time where with mysql you can open only one database at a time.

Comments (0)

Three elements to an SQL command.

  • keyword
  • identifier
  • optionally one or more literals


  • Select - retrieve data records from a table
  • Insert - add new data record to a table
  • Delete - remove a data record from a table
  • update - Modify data within an existing record in a table.


define the database object in the keyword command.  Can be either a database name, table name, or the names of data fields. Tells use with table to select the data element requested.


Define specific data values referenced by the keyword. String literals must be enclosed in quotes.

Database querys

SQL SELECT statement the searches the database for specific data records.

SELECT datafields FROM table

use commas to separate each data field. When the records that match the query are returned you can determine which data fields to return.  An asterisk will return all fields. Default returns all the data records in the specified table.


WHERE - display a subset of records that meet a specified condition

ORDER BY - display records in a specified order

LIMIT - display only a subset of records

An example of a where statement which allows you to specify conditions to filter data from the results set.

SELECT recipeid, title FROM recipes WHERE recipeid = 1

The order by statement specifies the data field (or fields) you want the returned data to be sorted. This can be ASC or DESC, ascending or descending sort.
an example would be
SELECT commentid, comment FROM comments ORDER BY commentid DESC

The limit statement specifies the starting record and the following number of records to be returned. The starting record is an offset within the returning records and not the actual record id.The offest value starts at 0 and goes to number of records returned in the statement.
An example would be
SELECT recipeid, title FROM recipes ORDER BY recipeid DESC LIMIT 0, 5



Comments (0)