On Github mermop / rubys-tea-party-frontend-talk
Merrin Macleod and Matt Hartley
Ruby's Tea Party, January 18 2014
Syntactic structure
<!doctype html> <html> </html>
<!doctype html> <html> <head> </head> <body> </body> </html>
<!doctype html> <html> <head> <title>Hello World</title> </head> <body> <h1>Hello World</h1> </body> </html>
<div /> <article /> <section /> <header /> <aside /> <a href="http://thenicestplaceontheinter.net/" /> <p class="beautiful classy" id="main-text" /> <style />
Styling
<link rel="stylesheet" href="styles.css"> ... <p class="beautiful classy" id="example"> Hello world! </p>
p { font-size: 12px; } .beautiful { font-family: 'Comic Sans MS', sans-serif; } .classy { color: #BADA55; } #example { background-color: #EEE; }
Hello world
Manipulating CSS and HTML
var alertLink = document.getElementById('alert-link'); alertLink.addEventListener('click', function (event) { alert('Trust you to listen...'); }, false);
var alertLink = $('#jq-alert-link'); alertLink.on('click', function (event) { $(this).hide(); alert('Trust you to listen...'); });
Bootstrap, Foundation, JQuery, PureCSS, HTML5 Boilerplate, etc etc etc