MySQL databases accept dates in many different formats. For example, YY-MM-DD, YYYY:MM:DD, YYYYMMDD, and YYYY-MM-DD, among the myriad options for date formatting. (Y is for year, M is for month, and D is for day.) Embracing HTML5’s pattern form attribute, which accepts a regular expression pattern, I wanted to accept dates from 0000-00-00 through 2015-12-31. […]
HTML5 audio has matured significantly since it was introduced in 2009. In its early days, for example, none of the major browsers supported the same audio file types, of which there are many. Today, however, they all support MP3, making it easy to render basic audio in a browser. A more elaborate tutorial is available […]
When teaching Ajax concepts, I’ve always shared a small web app that checks whether an email exists in a database. The code is now on Bitbucket and a video on how it works is on YouTube.
If you’re working with all the US states and you need to list all of them in a form, download the following Gist from GitHub: https://gist.github.com/code-warrior/acbd72bb34cc64b8137b#file-states-php It’s a self-submitting form (in PHP) and defaults to the GET method for posting.
When listing the HTML dimension attributes belonging to tags such as <img> and <video>, we have the option of including width before height, and vice versa. For example: which is the equivalent to Or which is equal to The convention, however, is to list width before height. Browsers do it. Image previewers do it. In […]
The Difference Between a Tag and an Element A Tag A tag is simply a less than sign (<), followed by a forward slash (/) if it’s a closing/ending tag, followed by a string of one or more pre-defined characters (a, li, body, etc), followed by a greater than sign (>). For example, the starting/opening […]
It’s important to understand the distinction between the terms “user agent,” “user,” and “author” when discussing CSS’s cascade. A user agent, or UA, refers to any browser when the term is used to discuss web-based technologies. Firefox, Chrome, and Opera are all user agents. A user is synonymous with a computer user. For example, I […]
Although this video is over two years old, it’s still helpful in showing how to connect to MySQL from The Terminal.
The word “head” takes on various meanings in HTML. For example, as the head of a document, the head of a table, or the heading of a section. There are other uses. Inside an HTML Tag Within a tag, head appears—or is implied—in <head>, <header>, <thead>, <th>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, and <hgroup>, […]
I’ve shown this drop down menu in class multiple times over the years, but I have never shared it. The project is now available on GitHub. You’ll need Sass to compile the CSS.