
New to HTML 5? First steps and Cheat Sheet
Faites défiler ci-dessous pour la traduction en français, et même vers le bas pour l’aide-mémoire HTML5 («cheat-sheet») au dessous de la traduction française.
Scroll below for the translation in French of this text, and to the bottom-most for the HTML5 cheat sheet below the French translation.
If you have some experience with previous versions of HTML such as version 4.01 but new to HTML 5, here are the first things you need to learn. So what’s new with HTML 5?
1. The doctype definition at the top of the file is simplifed:
The doctype definiton for HTML version 4.01 was something similar to the following
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
The doctype in HTML 5 is now simply:
<!doctype html>
2. The content meta tag is also simplified
Before HTML 4
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
After HTML 5
<meta charset="utf-8">
All browsers old and new already understand this meta description to my knowledge, so you can use it on any page and it just works.
3. The <link> tag within the <head> element slightly changed
What was before HTML 5
<link type="text/css" rel="stylesheet" href="style.css">
is now
<link rel="stylesheet" href="style.css">
4. The <script> tag can lose the type attribute for JavaScript
With HTML5, JavaScript is now the standard and default scripting language, so you can remove the type attribute from your script tags, too. Here’s what the new script tag looks like without the type attribute:
<script src="betik.js"></script>
or if you prefer to type inline code rather than an external .js file:
<script> var harikasin = true; </script>
French translation of the post below:
Premiers Pas en HTML 5
Si vous avezd’expérience avec les précédentes versions de HTML notamment la version 4.x mais vous êtes un nouvel arrivant en HTML 5, voici les premières choses que vous devez savoir. Alors, quoi de neuf avec le HTML 5 ?
1. La définition doctype au dessus de la page
La définiton doctype pour la HTML 4.01 était quelque chose de semblable à ce qui suit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
La doctype en HTML 5 est tout simplement :
<!doctype html>
2. La balise meta content est aussisimplifiée
Avant HTML 4
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Aprés HTML 5
<meta charset="utf-8">
Tous les navigateurs, anciens et nouveaux, déjà comprennent bien cette description meta, à ma connaissance, de sorte que vous pouvez l’utiliser sur n’importe quelle page et ça marche !
3. La balise <link> dedans l’élément <head>
Avant HTML 5 ce qui était tel que
<link type="text/css" rel="stylesheet" href="style.css">
est maintenant
<link rel="stylesheet" href="style.css">
4. La balise <script> sans l’attribut type attribute en cas de JavaScript
Avec HTML5, JavaScript est désormais la norme et le langage de script par défaut, donc vous pouvez supprimer l’attribut de type de vos balises de script. Voici ce que la nouvelle balise de script ressemble sans l’attribut type:
<script src="betik.js"></script>
ou bien si vous préférez taper le code en ligne au lieu d’un fichier externe js :
<script> var harikasin = true; </script>
HTML5 Cheat Sheet

Tag:HTML5


