Using only CSS, make the list from task 3 use squares instead of circles. This should apply to all
tags. Hint: investigate the list-style-type property.
You will need to add a new CSS definition for the UL tag to the CSS file.
Task 5
You notice that the text is too close to the edge of the div.
Add a padding to the main div. A padding of 10px should be enough.
Task 6
Go to the C:\xampp\htdocs\IITLab5 folder and create a new folder inside the IITLab5 directory called images. Copy the apple.jpg file to the images directory.
Task 7
Now in the HTML file, add the apple’s image to the page INSIDE the first paragraph after the text but just before the closing P tag.
Remember that animage tag looks like
"PUT THE URL HERE" alt = "IMAGE DESCRIPTION HERE" /> Use a relative URL to address the image.
Do not use absolute windows file paths e.g., C:\xampp\... as it will cause issues when you later move your web folder to a different location
The ALT tag specifies the alternate text for the image the ALT text should describe what the picture is. If the image is just for decoration, you should leave the alt text empty.
Reload the page, you should now have a large apple in the middle.
Task 8
You notice that the apple image is ridiculously large, also the file size is 200KB.
Remember that people who browse your website may have slow internet connections or be on a mobile device so having 200KB may cause the page to load slowly.
It is possible to resize the image in HTML with the width and height attributes (or in CSS) but that does not change the fact the image is 200KB.
The best course of action in this particular case is to make the imagefile smaller. There area number of ways togo about doing that, the simplest is to resize the image to be smaller.
In windows, open the images directory and right click apple.jpg and click Edit. That should bring up MS Paint. Select resize.
We want the image to be around 200px wide.
Now that you have a smaller image click File > Save As and save the file as: apple-small.jpg make sure to save it in the images directory.
You should now have two images of the apple. One big and one small.
Notice the file size of the smaller image is much smaller than the original.
Now go back to the HTML file and change the URL to reference the smaller image.
Task 9
Make the imagesit on the left side of the page and have the text flow around it.
The best way to do this is to make a new CSS class called imageLeft in your CSS file. Remember that in CSS, a class definition starts with a dot.
Hint investigate CSS float.
You then need to assign the imageLeft class to your tag.
Task 10
Some users might want to look at the high-resolution image of the apple.
We can make the small image link to the big image using a hyperlink. So that if you click the image it takes you to the larger version of the picture.
Hyperlinks are made using the tag, the href attribute to the URL togo to when clicked. In this case, we want to surround the tag with an tag.
"BIG APPLE URL HERE"> PUT IMG TAG IN HERE
Task 11
Using HTML make the following text appear at the end of the page (but still inside the main div)
I just used an tag inside an tag.
The trick to the question is escaping the angle brackets using HTML Entities. Refer to your lecture notes or use google to look for a solution.
Your text should also be in italics. Your text does not have to be centred.
Task 12
Copy the orange.jpg file to the images directory.
Remember the list from Task 3?
Make the word "Orange" a hyperlink to the orange picture.
Task 13
There are many online html validation testers that will check if your HTML code is correct Open https://html5.validator.nu/ or https://validator.w3.org/
Paste the URL of your HTML file into the validator and click validate/check. If your code has any errors, fix them, and try again until you get no errors.
Task 14
You want to add more pages to your website.
But before you can do that, there needs to be away for users to navigate between the pages. Most websites use a navigation bar to achieve this.
Navigation bars are generally at the top of the page but can also be on the side.
Create a new div in the HTML file, just after the header div but before the main div. Give this divan ID of'navbar'
Inside that div create an unordered list like so: