Skip to content

Instantly share code, notes, and snippets.

@mattslay
Last active June 27, 2016 00:54
Show Gist options
  • Save mattslay/a92a1759aae41edd0ce98e910242ae0d to your computer and use it in GitHub Desktop.
Save mattslay/a92a1759aae41edd0ce98e910242ae0d to your computer and use it in GitHub Desktop.
Basic getting started with html and javascript.md

This a small collection of getting-started-with-html-and-javascript samples that I created for coding beginners. Each link takes you to a code page hosted on jsFiddle where you can see the html/javascript code and how it renders on the screen. You can also play with the code in the jsFiddle editor to begin your own exploration and tinkering with html/javascript.


(Look for comments on each example in the lower javascript panel of the jsFiddle page.)

[00.0 - Basic HTML web page layout] (https://jsfiddle.net/mattslay/eq03yybz/)

  • the most basic sections of an html page: DOCTYPE, html, body

[00.1 - Introducing a few basic HTML elements] (https://jsfiddle.net/mattslay/9t4g5h4p/)

  • h1, h2, p, strong, em, u

[01.0 - Basic html input elements] (https://jsfiddle.net/mattslay/m93x50hy/)

  • textbox, radio buttons, dropdown list

[02.0 - Accessing html elements with javascript] (https://jsfiddle.net/mattslay/5b1j20ae/)

  • read values from form controls using the "id" attribure and getElementById() function

[03.0 - Javascript calculations and updating page data] (https://jsfiddle.net/mattslay/gsLe1myk/)

  • convert users weight in pounds to kilograms and display converted value on the form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment