- Introduction to HTML by Mozilla Developer Network
- HTML Developer Guide by Mozilla Developer Network
- HTML Reference by Mozilla Developer Network
- HTML(5) Style Guide and Coding Conventions by W3Schools
- HTML Element Reference by W3Schools
- HTML5 Element Flowchart—a quick guide on how to use HTML5 semantic elements
- The W3C Validator will return a validation error when there are consecutive hyphens (e.g. "------") inside HTML comments.
- Don't put any tags, even comments, before DOCTYPE declaration. They say IE9 and older go bonkers
- Insert the following CSS into the page to help along the illiterate MSIE browsers:
header, section, footer, aside, nav, main, article, figure {display: block;}
- When creating new elements insert "The Shiv" in the head tag to edumacate illiterate version 8 and older of MSIE ("HTML5 Enabling JavaScript" by Sjoerd Visscher)
- When creating new elements insert the following script in the head tag. It's—as you guess—again for the ignorant IE.
<script>document.createElement("newElement")</script>
- "Character Reference," "Character Entity Reference," "Numeric Character Reference." I can never get those terms straight. Here's the definitive definitions of those terms, straight from the W3C.
- Bear in mind that character entity references are case-sensitive. So
Π will display Π (upper case the Greek letter pi) whileπ will output π (lower case pi) - A very good Character Entity Reference Chart by the W3C. Hovering over an item displays the description of that glyph. The page is searchable (use the find feature in your browser—Ctrl+F in mine). And it lists alternate character entity references. Thus I discovered that
· · &CenterDot ; all refer to the same decimal character reference· and so produce the same glyph. - Extensive, if not complete, list of named character references by the W3C. Hovering over the glyphs will display a magnified view. (Note: As of April 2016 the page does not render properly in Opera (v36). No immediately apparent problems in Firefox (v45).
- amp-whatis "a quick, interactive reference of 14,500 HTML character entities"
- document.registerElement() and its use in creating custom elements by Mozilla Developer Network
- How to Create Custom HTML Elements by Matt West of treehouse
- Custom Elements: Defining new elements in HTML by Eric Bidelman of HTML5 Rocks
- To create Dublin Core
meta tags go to The Dublin Core Generator - Dates should be in the format: YYYY-MM-DD or YYYY-MM or YYYY
- For values for
DC.Format see this list of Internet Media Types as recommended by DCMI - For values for
DC.Type see DCMI Type Vocabulary - Introduction to and use of the Dublin Core
- Dublin Core Metadata Element Set—descriptions of the original fifteen DC elements
- A comprehensive list of DCMI metadata terms
- Dublin Core uses the
scheme attribute in (x)htmlmeta tags. However, thescheme attribute is considered obsolete and the W3C Validator will flag its use as an html validation error. I find that strange given that the DMCI is a member of the W3C. Perhaps a case of both hands not knowing what the other has been up to?
- If you need some incomprehensible or nonsensical text to temporarily populate your web page while it's under development, you can use this lorem ipsum generator. It can automatically encapsulate paragraphs in
<p> tags. There are options for how long paragraphs are. And there are even alternative texts to choose from. - Or if you'd like a little more levity, stuff your page using the Bacon Ipsum Generator
- The web authoring software that I've been using of late is Notepad++. It's free and feature-filled (alliteration unintended).
- Good typography, among other things, means using curly quotation marks instead of the default straight quotes we get from the computer keyboard.
- Here's a handy Markdown syntax cheat sheet.
- CSS Tutorial by W3Schools
- CSS Reference by Mozilla Developer Network
- CSS Reference by W3Schools
- CSS Properties Index
- CSS Media Queries
- Media Queries for Standard Devices
- By default this page uses Open Sans typeface from Google. It's a beautiful, clean and crisp font. Find Open Sans and a zillion other fonts in Google's font site. To use Open Sans (just Latin and normal non-italicized) choose either of the following methods:
- Include the following tag in the
<head> element<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans" />
- Include the following rule in the CSS stylesheet
@import url("http://fonts.googleapis.com/css?family=Open+Sans");
Remember to place@import rules at the very beginning of the stylesheet before any other rules or they won't work.
- Include the following tag in the
- Ways of centering a
table using CSS:- Specify the width of the table and then let the left and right margins adjust automatically. For example to center a table with a width of 80% use the following rule:
table {
width: 80%;
margin: auto;
} - Specify the left and right margins and let the table width adjust automatically. For example, to center a table with a width of 80% and zero margins on the top and bottom use the following rule:
table {
width: auto;
margin: 0 10%;
}
- Specify the width of the table and then let the left and right margins adjust automatically. For example to center a table with a width of 80% use the following rule:
- JavaScript Tutorial by W3Schools
- JavaScript Style Guide and Coding Conventions by W3Schools
- JavaScript Guide by Mozilla Developer Network
- JavaScript Reference by Mozilla Developer Network
- To convert a decimal integer to a hexadecimal string use the following:
decimalinteger.toString(16); // decimalinteger is a variable containing a decimal integer
To convert a hexadecimal string to a decimal integer use the following:parseInt(hexstring, 16); // hexstring is a hexadecimal literal or a variable containing a hexadecimal number as a string
Likewise, to convert a decimal integer to a binary string and to convert a binary string to a decimal integer use the following respectively:decimalinteger.toString(2); // decimalinteger is a variable containing a decimal integer
parseInt(binarystring, 2); // binarystring is a binary literal or a variable containing a binary number as a string
In general, the.toString(radix) method can be used to convert a decimal integer to any number as a string with a radix/base from 2 to 36, whileparseInt(string, radix) can be used to convert a string to a decimal integer (2 ≤ radix ≤ 36). [source: David Flanagan, JavaScript: The Definitive Guide, 4th ed., O'Reilly & Associates, 2002, p.164-165, 500-501, 509-510.]
- jQuery reference for methods, selectors, events, etc. etc. etc.
- The
.ready() method checks whether the page (html) has finished loading and then executes whatever script is inside. Placing your script within this method will ensure that the script wil automatically run once the web page has been completely loaded. Moreover, the script can be placed anywhere in the page or in an external file and it will still run (only) after the page has been completely loaded. - Use
$(function() {
as a shortcut for
/* your script goes in here */
})$(document).ready(function() {
/* your script goes in here */
}) - Use the following to load the latest Google hosted jQuery library version 1.x.x
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
and the following to load the latest 2.x.x version<script src="https://ajax.googleapis.com/ajax/libs/jquery/2/jquery.min.js"></script>