Master 1 IFI | Lab Session #2 | (adapted from a subject by P. Renevier) |
Web | A refresher on HTML, CSS, and DOM | Year 2021-2022 |
All your pages must be valid. You can start from a minimal page complying with the HTML5 DTD:
<!doctype html>
<html lang="fr">
<head>
<title>pages pour le cours Web...</title>
<!-- ligne pour l'encodage de la page -->
<meta charset="utf-8">
</head>
<body>
</body>
</html>
Make sure that the encoding of your file be consistent with the "encoding" and "charset" attributes (this depends on the editor you are using).
The goal of this exercice is to master the tables in HTML. We will focus on their formatting in the next exercice.
Yous task is to reproduce the following model table.
We will ignore, for the moment, the horizontal brace, the arrow, and the dashed grid. The results will look something like the table below.
As a reminder, the structure of a table in HTML is as follows:
<table>
<caption> </caption>
<thead>
<tr>
<th></th>
<!-- etc. -->
</tr>
<!-- etc. -->
</thead>
<tbody>
<tr>
<td></td>
<!-- etc. -->
</tr>
<!-- etc. -->
</tbody>
</table>
Add the following hyperlinks:
In four "simple" steps, you should obtain this result:
In case you had troubles constructing the table in HTML, you can use this partial solution. Notice that this entire exercice can (and should) be done without adding any class or id attribute to the HTML code.
To format the table, you have to:
Here are the formatting instructions for data cells:
Can you factor a part of the declarations for the data cells of the table body, to comply with the Do Not Repeat Yourself principle?
Make the DU IG cell half (0.5) transparent. To this aim, you can slightly modify the HTML code by adding a class.
Warning: what is asked for is only partially feasible (due to an issue with rounded border connection).
Try to have the cells for parcours Miage and Licence informatique touch like in the following figure ("touching" cells and animated star).
To do this, use either a big shadow or HTML elements to be placed in absolute or relative position. However, the result is browser-dependent.
Try to place a star (like this one) turning around the parcours Miage cell. Depending on the browser, your solutions might vary.
Use an absolute placement of the image in a cell with relative placement (does not work in Firefox under Windows). Define the five frames of the animation using @-prefix-keyframes as a positioning of the image at one of the four corners of the cell (the first position being repeated at the end to close the loop). You may as well have other properties vary (e.g., opacity or box-shadow). The actual positioning at the four corners will strongly depend on the browser (suggestio: define all dimensions using the same unit). Then, associate the animation and the image using @-prefix-animation. Have this animation loop forever (does not work in Firefox).
Year 2019-2020 | Web - Master 1 IFI - Université côte d'Azur | Andrea G. B. Tettamanzi |