Adding pages and content
Creating Your web site
Finishing Your web site
Set your Learning Objectives to red.
Open up your PowerPoint from last lesson it should be called 'Web Design'.
Save your PowerPoint as 'Web Design'
Last lesson we saw that we could turn our code into a web page which we you can view in a web browser.
We did this by making sure we have a folder to store our web page
Folder Structure for you web pages.
In order to create our web page we used a text editor notepad ++
To open your web page file from last week
Save your file
One of the best ways we can layout our page is to use dividers. Dividers or divs enable us to split up and style different areas of our page.
Let's create the outline area for our page.
To do that we are going to use a divider <div> tag and style it with a border so we can see it.
Your code should look like code below:
Your web page should look like this
Now let's change the size of the divider so it will be the full size of our page. To do that we need to add the styles Height and Width into our styling for our divider.
However this makes the styling in the blocks a little cumbersome and more difficult to reuse. So instead of doing the styling inside of our divider, we are going to style our divider in the Head of our web page.
To do that we have to give our style a name. Then we can use that name in our divider and it will do all the styling we use here inside our divider.
Change your code so it now looks like this:
We can have as many styles as we want in a class.
The border has 3 properties the first is its width in pixels(px), in our case that is 1px the second is it's style which we have chosen as solid and the third is its colour we have chosen red
We can do that to our page by adding a style called margin
However what we want to do can't be done with the margin block in edublocks, so we need to use the plain text block and type our code into it
If we set the properties of the margin to 0 auto then it will automatically centre our divider(div) on the page
Add this to the end of your divider style: margin: 0 auto;
see example below
Click on the button below to see what your code would look in a web browser. Click here
Screenshot your centred web page layout and your HTML code into your PowerPoint
Copy your code to your notepad file and save it and then refresh your browser and your page should now look something like this.
Screenshot your code into your PowerPoint
Before we add in our own page banner let's first see how we add an image to our website. To add an image we need to put a link to it in the img src tag. Copy the link below and paste it into the img src tag.
if you haven't made a banner use the one below just so you have a banner image to use. Right click on it and save it as banner.png
We cannot give edublocks a link to our banner as it is on our computer, so we will have to copy our code into our notepad ++ page to see this working.
You must put your banner and web page inside the same folder, "Web Design", for this to work.
<div style ="display:inline-block">
Split your main page into three sections and make the French flag
See my example by clicking on the button below (my colours are the wrong way around).
We can use a % for our width rather than pixels that way whatever the size of our outside border it will always chage to fit it.
Lets look at the learning outcomes and decide which one best describes our current level of understanding :
Tick the one you feel is closest to your level