This is a draft cheat sheet. It is a work in progress and is not finished yet.
HTML page skeleton
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<html lang="fr">
<meta charset="UTF-8">
<meta name="description" content="Description of the website">
<meta name="keywords" content="keyword1,keyword2,keyword3,...">
<meta name="author" content="Hege Refsnes">
<link rel="stylesheet" href="styles.css">
<script src="myJSscript_src.js"></script>
<script src="jquery-3.1.1.min.js"></script>
</head>
<body>
<div id="main">
<header>
<h1>mon titre</h1>
</header>
<section>
</section>
<footer>
<p>texte du footer</p>
</footer>
</div>
</body>
</html>
|
HTML Forms
-------------Normal data form--------------
<form action="action_page.php" method ="post">
First name:<input type="text" name="firstname" placeholder="First name"><br>
Last name:<input type="text" name="lastname" placeholder="First name"><br>
<input type="hidden" name="country" value="Norway">
<input type="submit" value="Submit" name ="submit">
</form>
-------------File upload form--------------
<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit">
</form>
|
Select list
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
|
|
|
Ways to reduce page loading time
Reduce image size |
Remove unnecessary widgets |
HTTP compression |
Placing CSS at the top and script reference at the bottom or in external files |
Reduce lookups |
Minimize redirects |
Caching |
About CSS
Variations |
CSS, CSS1, CSS2, CSS2.1, CSS3, CSS4 |
3 ways of integration |
>inline(html attribute) >embedded (in head element) > linked/imported (in head via external file) |
CSS Tricks
Center block elements with CSS1 |
margin-left:auto; margin-right:auto
|
|