Exercise: Page layout / adding images

1. Create an images folder on the server

Images should live in their own folder (or folders).

  1. Open Filezilla
  2. Create a new folder, images, at the same level as your hcde532 folder (note case)
    DISCUSS FILE STRUCTURE DECISIONS!
    image folder

 

2. Find a photo you like

 

3. Upload the photo to the images directory

The name should be lower case and have no spaces. Either use camelCase or name-with-dashes. No underlines.

Be use to know what the file extension is (.gif, .png, .jpg).

 

4. Create a new page, image-text.html

  1. Open your index.html page.
  2. Copy this code, paste it into inside the BODY tags and save as image-text.html.
  3. Changing the placeholder name to the name of your file and correct the ‘yourNetID.’
  4. Then upload the page into your working directory.

Do both images load?

<h1>My First Page With An Image</h1>
<h2>Header Level 2</h2>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
<p>Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.</p>

<img src="http://faculty.washington.edu/kegill/images/shutter-stock-feet-puddle-1000px.jpg" style="width: 600px" alt="rain puddles" />    
    
<img src="/yourNetID/images/name-of-your-image-here.jpg" style="width: 60%" alt="your image" />