<!DOCTYPE html> <html lang="en"> <head> <title>Hello</title> </head> <body> <h1>Hello, world!</h1> </body> </html>
.html
<h1>
<h6>
<p>
<ul>
ol>
<li>
<ol>
<a href="URL">
<img src="URL" alt="description">
src
alt
title
width
height
<form>
<input>
text
email
password
<input type="submit">
action
method
element
.class
#id
[attribute]
color
font-size
margin
padding
<!DOCTYPE html> <html lang="en"> <head> <title>Hello</title> </head> <body> <!-- Inline CSS (quick, one-time styles; not recommended for production)--> <h1 style="color: #006644">Hello, world!</h1> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <!-- Internal CSS (useful for unique, single-page styles) --> <style> h1 { color: #006644; } </style> <title>Hello</title> </head> <body> <h1>Hello, world!</h1> </body> </html>
<!DOCTYPE html> <html lang="en"> <!-- External CSS linked from style.css (recommended for most projects) --> <link rel="stylesheet" href="style.css"> <head> <title>Hello</title> </head> <body> <h1>Hello, world!</h1> </body> </html>
if (x < y) { console.log("x is less than y"); } else { console.log("x is not less than y"); }
let counter = 0;
counter = counter + 1; // or counter += 1; // or counter ++;
let counter = 3 while(counter > 0){ console.log("meow"); counter = counter - 1; }
for (let i = 0; i < 3; i += 1) { console.log("meow"); }
// If you want to crash your Chrome while (true){ console.log("meow"); }
blur change click drag focus keyup load mousedown mouseover mouseup submit touchmove unload ...
<!DOCTYPE html> <html lang="en"> <head> <title>Hello</title> <!-- Link to external JavaScript file --> <script src="script.js" defer></script> <!-- "defer" ensures the script loads after HTML parsing --> </head> <body> <h1>Hello, world!</h1> </body> </html>