In this exercise, you see some typical layouts for homepages.
Try to figure out appropriate heights and widths for the tabledata.
Title of the homepage: HTML |
|
|
Main content of homepageHyperText Markup Language commonly referred to as HTML is the standard markup language used to create web pages. It is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>). HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags). |
bottom line of homepage |
In this exercise, you see some typical layouts for homepages.
Try to figure out appropriate heights and widths for the tabledata.
Title of the homepage |
||
some small title or menu | ||
Main content of homepageHyperText Markup Language commonly referred to as HTML is the standard markup language used to create web pages. It is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>). HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags). |
||
bottom line of homepage |
In this exercise, you see some typical layouts for homepages.
Try to figure out appropriate heights and widths for the tabledata.
Title of the homepage |
|||
some small title or menu | |||
HyperText Markup Language commonly referred to as HTML is the standard markup language used to create web pages. It is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>). | HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags). | ||
bottom line of homepage |
So far, if we wanted to define the height or width of a tabledata, we always used pixels.
But if you create a webpage, you don't know how large the monitor is of the other people who are looking at your homepage.
So if we use pixels, it will look differently on every monitor.
For this reason, we now use percentages:
<td width="80%"> Hello World </td> <td width="20%"> Hello Back</td>These two tabledata will always have the same ratio, if there is enough space.
First Column | Second Column |
---|---|
Hello world | Hello back |
In the last exercise, the table did not span over all of your monitor, right?
So let's change that and add the following keyword to your table tag:
For this reason, we now use percentages:
<table width="100%">Now the same table will span over all of your monitor.
First Column | Second Column |
---|---|
Hello world | Hello back |
From now on, you will only use percentages if you want to make the width of a table. No fixed lengths anymore. So let's do some repetition of the first exercises
A |
B |
|
D |
E |
|
F |
G |
Some more repetition of the first exercises
A |
B |
|
C |
D |
|
E |
F |
But the table does not need to be as wide as the whole window. it can be a bit smaller. Say, 80% for example.
A |
B |
||
D |
E |
F |
|
H |
I |