- 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
- "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?
- 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>
- Markdown Syntax by John Gruber, the creator of Markdown
- Use John Gruber's
Dingus
to write markdown text and see the html markup as well as how it will appear in browsers. Includes a cheat sheet for markdown syntax - Here's a handy Markdown syntax cheat sheet.
- Am currently using MarkdownPad 2 by Evan Wondrasek for writing and saving markdown text.
- 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.
- Use favicon.cc to create an icon that appears in the browser tab. Save the image in the appropriate directory and then add the following to the
head tag of the page:<link rel="icon" type="image/vnd.microsoft.icon" href="http://mypage.net/images/favicon.ico" />
(assuming that the icon is in the folder named images) - HTML Minifier is an online minifier with a host of options for reducing html file size to minimize browser loading time.
- In August 2016 I switched over to Sublime Text 3 as my default HTML and SCSS/CSS authoring software. With Emmet plug-in installed typing HTML tags has never been easier and in fact has become fun. I tried installing Emmet in Notepad++ but for some reason it won't work—even after fiddling around with the keyboard shortcut assignments.
- To install Emmet in Sublime Text 3 first install Package Control then in Sublime Text 3 go to Tools > Command Palette and type in "install" and choose "Package Control: Install Package." Then type "emmet" and choose "Emmet."
- Emmet References:
- CSS Tutorial by W3Schools
- CSS Reference by Mozilla Developer Network. Includes reference for CSS Selectors and tutorials on CSS animation, gradients, transitions, transforms, etc.
- CSS Reference by W3Schools
- CSS Properties Index
- CSS Nomenclature — Just to make sure you know the difference between "property", "value", "declaration", "ruleset" and what have you.
- Color Tools by Koshevoy Dmitry — standard CSS color names, non-standard color names and their RGB values + shades/tints thereof, two-color linear and radial gradient generator, et al.
- Color Standards (sorta) as compiled by W3Schools: USA, UK, Australia, RAL, National Bureau of Standards, Natural Color System, Crayola, Resene, xkcd, product brands, trends
- Sass Basics
- Learn Sass in 15 Minutes
- A Sass and Compass Tutorial on Youbtube
- A Visual Guide to Sass and Compass Color Functions
- Fearful of using the command line I've opted to use Koala GUI app to compile my Sass files. Don't forget to tick the checkbox for "Autoprefixer" in the compile options for Sass. That'll automatically add/prepend CSS declarations with the necessary vendor-specific prefixes. For example, if your scss contains the declaration
display: flex;
the Koala Autoprefixer will turn that intodisplay: -webkit-box;
Note: As of May 2016 the Koala Autoprefixer still adds certain outdated prefixes (e.g.,
display: -webkit-flex;
display: -ms-flexbox;
display: flex;display: -webkit-flex; ). No harm done except for added memory space and download time. - If you want to use the latest Autoprefixer, paste your CSS into Autoprefixer Online.
- As of May 2016 the Scout page only has the faulty v0.7.1 on its home page. That's strange because they supposedly already have a re-released working version on this GitHub page. That page also contains the beta version of Scout 2.0 which can be downloaded and installed. On Windows machines just donwload the zip file, unpack, and run the exe file.
- Complete Guide to Flexbox is a painless intro to CSS Flexbox and a graphical summary of what the Flex properties do and target.
- Advanced layouts with flexbox by Mozilla Developer Network
- Using CSS flexible boxes by Mozilla Developer Network
- Using flexbox to lay out web applications by Mozilla Developer Network
- Guide to centering elements using Flex Box
- 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:
- Removing the space between inline-block elements
- A host of CSS reset and normallization stylesheets
- 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.] - Handling Long Words and URLs using CSS magic
- 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>
- They said add the following meta tag to all your pages and so I did.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
It ought to make smartphones a lot smarter they said. Looks like it does. - CSS Media Queries is an excellent site to check which queries your browser is currently giving a thumbs up to. For instance if you change the viewport size on your laptop or if you rotate your phone/tablet from portrait to landscape mode, some of those queries may or will turn from green to red or red to green.
- Media Queries for Standard Devices provides a list of device widths, heights, ratios for a number of well-known brands including Apple and Samsung.
- A more detailed and in-depth intro to media queries by Mozilla: Using media queries