Help on HTML, CSS, JS and JS libraries

From ImpVis Wiki
Revision as of 18:41, 16 July 2021 by Mark Thomas (talk | contribs)
Jump to navigation Jump to search

HTML

HTML is less of a language and more of a collection of blocks or ‘elements’ that define what goes on your page. These elements are defined using opening and closing tags. For example, if I wanted to have an element displaying “hello world,” I would have an open <div> tag, followed by the text, followed by a closing </div> tag. So overall, the element looks like:

<div>hello world</div>

When constructing your own HTML, it is likely to be composed of two sections: a head and a body. In the Head, all of your external packages apart from your JavaScript file(s). For example, if I were using MathJax to write my equations, I would put the MathJax importing script into the Head. The body contains the actual elements that appear on the page. Then, you should import your JavaScript (or JS) files at the end of the body. This is done because if the JS files were in the Head, they might reference things that aren’t defined yet.

For more tutorials on HTML, here are a few useful resources:

  • W3 Schools: https://www.w3schools.com/html/html_intro.asp
  • CodeAcademy: https://www.codecademy.com/learn/learn-html