- Currently Listening to:
- Weezer — The World Has Turned And Left Me Here
Some ordered lists are better presented in descending order. For example, my publications list works better in reverse-chronological order so that the most recent work appears at the top of the list, and is numbered highest-to-lowest.
Ordered lists in HTML are created using the ol element, but there’s no way to present a list in descending order. (It’s in the HTML5 spec, but might be a while before it’s generally usable.)
The JavaScript solutions I found to achieve this were all a bit rubbish—adding spurious numbers to the margin and generally messing up the semantics of the list. So I wrote a quick function that finds each ol element on the page that has the class “reversed”, and changes the “value” attribute of each li to the number it would have in a native reversed-order presentation. It’s not semantically perfect, but it degrades gracefully and will do until browsers support the HTML5 incarnation of ol. The JavaScript looks like this:
function reverse_lists() {
var olists = document.getElementsByTagName('ol');
for (var i = 0; i < olists.length; i++) {
if (!olists[i].className.match(/\breversed\b/))
continue;
var items = olists[i].getElementsByTagName('li');
for(var j = 0; j < items.length; j++) {
items[j].setAttribute("value", items.length - j);
}
}
}
You can download a .js file with this function and upload it to your server. Apply the code by calling the function after all of your list elements (the first script element can be put in the document’s head if you have control over that):
<ol class="reversed">
<li>Most recent item.</li>
<li>Less recent item.</li>
⋮
</ol>
<script type="text/javascript" src="reorder.js"></script>
<script type="text/javascript">
reverse_lists();
</script>
And in your place an empty space
Has filled the void behind my face.
- zen-coding - Project Hosting on Google Code
- HTML5 Boilerplate - A rock-solid default for HTML5 awesome.
HTML5 Boilerplate is the professional badass's base HTML/CSS/JS template for a fast, robust and future-proof site.
- RegEx match open tags except XHTML self-contained tags - Stack Overflow
- Haml - Wikipedia, the free encyclopedia
Haml (HTML Abstraction Markup Language) is a markup language that is used to cleanly and simply describe the XHTML of any web document without the use of traditional inline coding. It’s designed to address many of the flaws in traditional templating engines, as well as making markup as elegant as it can be. Haml functions as a replacement for inline page templating systems such as PHP, RHTML, and ASP. However, Haml avoids the need for explicitly coding XHTML into the template, because it is itself a description of the XHTML, with some code to generate dynamic content.
- The Simple Way to Scrape an HTML Table: Google Docs | EagerEyes.org
After some digging around and even considering writing my own throw-away extraction script, I remembered having read something about Google Docs being able to import tables from websites. And indeed, it has a very useful function called ImportHtml that will scrape a table from a page.
To extract a table, create a new spreadsheet and enter the following expression in the top left cell: =ImportHtml(URL, "table", num). URL here is the URL of the page (between quotation marks), "table" is the element to look for (Google Docs can also import lists), and num is the number of the element, in case there are more on the same page (which is rather common for tables).
- HTML5 differences from HTML4
- Glossary | HTML5 Doctor
- What Beautiful HTML Code Looks Like | CSS-Tricks
- Web Teacher › Semantic HTML, or why Chris Mills is my guru
If you are marking up content with semantic HTML, the HTML itself describes for you what the content is. It’s a paragraph, it’s a list, it’s a blockquote, it’s a heading, it’s a citation, it’s emphasized. You can trust this to be what you are reading, because it’s marked up with the HTML to describe it as exactly what it is.
- Flex and Java – A perfect technological marriage | Adobe Developer Connection
The languages that Flex uses will be familiar to anyone coming from a Java background. This way, you don't waste everything you have learned over the years, you are only applying it a little differently. It comes down to the old proverb: Everything old is new again.
- Adobe Integrated Runtime - Wikipedia, the free encyclopedia
AIR is intended to be a versatile runtime environment, as it allows existing Flash, Actionscript or HTML and JavaScript code to be used to construct a more traditional desktop-like program. Adobe positions it as a browser-less runtime for rich Internet applications that can be deployed onto the desktop, rather than a fully-fledged application framework.
- 24 ways: Make Your Mockup in Markup
Crashing and text rendering issues suck, but we’ve learned to live with them. The real issue with using Photoshop for mockups is the expectations you’re setting for a client. When you send the client a static image of the design, you’re not giving them the whole picture — they can’t see how a fluid grid would function, how the design will look in a variety of browsers, basic interactions like :hover effects, or JavaScript behaviors. For more on the disadvantages to showing clients designs as images rather than websites, check out Andy Clarke’s Time to stop showing clients static design visuals.
- 5 New Technologies That Will Change Everything - PC World
3D TV, HTML5, video over Wi-Fi, superfast USB, and mobile "augmented reality" will emerge as breakthrough technologies in the next few years. Here's a preview of what they do and how they work.
- Did you know about protocol-relative hyperlinks? - Jon Galloway
The real way to fix the problem is for web dev's to use protocol-relative hyperlinks, such as <img src="//www.google.com/intl/en_ALL/images/logo.gif" /> - that will use HTTPS if the page is HTTPS an HTTP if the page is HTTP, preventing both the security vulnerability and the security prompt. Rather than trying to fix the links in code, we’re relying on a specified and supported HTML feature (RFC 1808, Section 2.4.3, circa 1995)
- 24 ways: Incite A Riot