html cheat sheet
Heading <h1></h1> <h2></h2> <h3></h3>
paragraph <p></p>
Line Break <br>
non-breaking space
Unordered, bullet-point list <ul> <li> </li> </ul>
Horizontal Line <hr>
underlined text <u></u>
preformatted text <pre> </pre>
Basic Structure
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
<!-- HTML Comment -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="/styles.css">
<script src="/script.js"></script>
<link rel="shortcut icon" href="" />
Basic Link <a href=""></a>
opens in new tab <a href="" target="_blank"></a>
open in iframe <a href="" target=" frame1"></a>
email <a href="mailto:you@mail.net"></a>
image link + new tab
<a href="" target="_blank"><img src=""></a>
image <img src="">
image + alt & size
<img src="" alt="" width="" height="" />
<div style="background-color:#;color:#;width: 100%;padding:0%;">
</div>
<div style="background-image: url(/);
background-repeat: repeat ;color:green;width: 100%;padding:0;"></div>
audio
<audio controls>
<source src="sound.ogg" type="audio/ogg">
<source src="sound.mp3" type="audio/mpeg">
No audio support. </audio>
autoplay & loop
<audio autoplay loop
source src=".mp3" type="audio/mpeg">
</audio>
video
<video width="200" height="150" controls>
<source src="vid.mp4" type="video/mp4">
<source src="vid.ogg" type="video/ogg">
No video support. </video>
basic google search
<!-- Search Google -->
<form method="get" action="https://www.google.com/search">
<input type="hidden" name="ie" value="UTF-8" />
<input type="hidden" name="oe" value="UTF-8" />
<table bgcolor="#FFFFFF">
<tr>
<td>
<a href="https://www.google.com/">
<img src="https://www.google.com/logos/Logo_40wht.gif" border="0"
alt="Google" align="absmiddle" /></a> <input type="text" name="q" size="25"
maxlength="255" value="" /> <input type="submit"
name="btnG" value="Google Search" />
</td>
</tr>
</table>
</form>
<!-- Search Google -->
web search used on this page
<form name="searchform" onSubmit="return dosearch();">
<input name="sengines" type="radio"checked="checked" value="http://www.google.com/search?q="> Google
<input name="sengines" type="radio" value=" https://duckduckgo.com/?q="> duckduckgo
<input name="sengines" type="radio" value="https://www.startpage.com/do/dsearch?query="> startpage
<input name="sengines" type="radio" value="http://search.yahoo.com/search?p="> Yahoo
<input name="sengines" type="radio" value="https://www.bing.com/search?q="> bing <br /><br>
<input type="text" name="searchterms">
<input type="submit" name="SearchSubmit" value="Search" class=" button">
<script type="text/javascript">
function dosearch() {
var sf=document.searchform;
for (i=sf.sengines.length-1; i > -1; i--) {
if (sf.sengines[i].checked) {
var submitto = sf.sengines[i].value + escape(sf.searchterms.value);
}
}
window.open(submitto);
return false;
}
</script>