Lesson 4
- Double click the icon on your desktop to open ‘Notepad++’
- Click ‘File’ & ‘Close’ to close any files that appear.
- Navigate to the folder called ‘Website Files’ on your network and open Lesson4.html
You will now see the following code:
Note that there is more HTML in this file than you would have seen in previous lessons, these contain:
- <!doctype html> – Tag that tells the browser that this is a HTML5 page
- <script></script? – This tag links to other files on the website such as JavaScript/Jquery files. Explanation of these files can be found here https://jquery.com/. We will use script files for the interactive stuff on our site.
- <link></link> – Links ‘Style Sheets’ to our page. Style sheets define the look and of our page and separate the style from the content in our page.
- <div></div> – Known as a ‘Division’ tag, The <div> tag is used to group elements to format them with styles, in our example, each ‘Div’ tag has its ID that’s linked to a style.
- On line number 4 find: <title>My Name is XXX YYY</title>
- Replace ‘XXX YYY’ with your name.
- On line number 15 find: <strong>My name is…XXX</strong>
- Again replace ‘XXX’ with your name.
- To display a static image you use the <img></img> tag. Inside this tag you tell the browser where to find your image i.e.<img> src=”images/Screwdriver128.png”</img> images is our folder name and Screwdriver128.png is our file name.
- To display a dynamic (clickable image) you need to use the <a href=””></a> tag.
In this exercise, we are doing something different, so we are using both.
- Now find line 15, this line is where you specify the location of the image you wish to use. Change both the href and src location to point to your image in the ‘images’ folder.
- ‘Save’ your page.
- Again in line 15 delete everything between the </br> tag and the closing </p> tag and replace this with your profile information.
- ‘Save’ and ‘Run’ your page. You should now see your profile page.
- ‘Click’ your picture – what happens?
- ‘Click’ ‘Home Page’ – What happens?
Take me to lesson 5 'The Box Model'