Xah Web Dev Blog Archive 2011-08
CSS tutorial, now on its own page: Xah CSS Tutorial.
It's a pity. With HTML5 and all advances, it seems midi file is still not supported. Test here: HTML5 Audio Tag Midi File Test.
Yesterday, i removed all
This is a story of political chaos of the web.
In the beginning of time, a time of Netscape kingdom, ~1996, it was just
Then, with Microsoft's meddling, with JScript and VBScript, it became
By ~1999, a entity called W3C
emerged, over-peering correctness on earth, it declared that the attribute
However, in practice, both the “language” and “type” are always optional, and no browser's parser actually give a flying f￼ck about it.
Then, around ~2007, the standard body changed its mind and thought that the type really should be
(See: Internet media type)
Nobody in their right mind ever used that.
Then, in our glorious HTML5 era, ~2009, ruled by Google and Apple, in their HTML5 spec, it's back to
Semantic Web: Emerging Practice of Including Language Name in Embedding Computer Language Source Code on Web Pages
There's a new practice since HTML5 about embedding computer language source code on web pages.
Normally, you just use “pre”, like this:
<pre> x = 5 print x </pre>
However, there's no indication of what language it is. Indicating a language is desired because search engines and other tools can get that info and process it accordingly (such as syntax coloring tool). (this is the idea of semantic web.)
So, it appears, there's this practice of introducing the language info, by embedding a “code” tag with “class” set to “language-‹name›”. Like this:
<pre> <code class="language-python"> x = 5 print x </code> </pre>
However, there's no standardized string for the language string.
- Reference: The code element At dev.w3.org…
Overall, this practice seems ad-hoc and questionable, but a mob-standard might be better than none.
What's the problem? For example, the semantic of “class” tag isn't designed to be used to encode language names. Also, having “code” nested inside “pre” is a redundant hack. A improvement might be:
<code class="language-python" style="white-space:pre;display:block"> x = 5 print x </code>
But this throws-off intuition, because most people are much more familiar with “pre” tag. So, perhaps we can do:
<pre class="language-python"> x = 5 print x </pre>
All of the above are hacks in using HTML Microformat as a way to embed info for semantic web. A proper solution is a dedicated tag in XML, but XML is going the ways of dinosaur. Among the HTML microformat hacks above, i can't say which one is superior.
For the politics of HTML5 and XHTML, see: Are You Intelligent Enough to Understand HTML5? • HTML6, JSON SXML Simplified • HTML5 Doctype, Validation, X-UA-Compatible, and Why Do I Hate Hackers.
some font related articles. The Chinese Fonts Comparison one is new.
- Chinese Fonts Comparison; 中文字體比較
- Standard Web Fonts
- Best Unicode Fonts for Programer
- Google Webfont Tutorial
- Unicode Font Comparison: Arial Unicode MS vs DejaVu Sans
- Math Font ℤ ℚ ℝ ℂ ℜ ℑ ℵ
Project Gutenberg Founder Died (Michael S Hart, 1947 – 2011)
Michael S Hart (1947 – 2011) died on Sept 6th. Cause of death is not mentioned.
Here's the news sources:
- Obituary for Michael Stern Hart By Gregory B Newby. At http://www.gutenberg.org/wiki/Michael_S._Hart
- Michael Stern Hart, 1947-2011 By Maitri Erwin. At http://vatul.net/blog/index.php/6100
- Obituary for Michael Stern Hart, Project Gutenberg Founder (gutenberg.org) By News.Ycombinator.Com. At https://news.ycombinator.com/item?id=2971971
I benefited from Project Gutenberg. Specifically, i used it to get the original text for the following 3 annotated work:
- The Tragedy Of Titus Andronicus
- Gulliver's Travels into Several Remote Nations of the World
- Alice in Wonderland
The Google+ Rap
Google Chrome Reports a Malware Infested Site
Here's a Google Chrome screenshot, reporting that a site has been hacked.
The site belongs to a popular photographer Trey Ratcliff Trey Ratcliff on g+.
If you need a invite to g+, click on this plus.google.com
If you don't know what is g+, see: What is Google Plus? (humor).
Facebook Disclosing Phone Numbers
it looks like you can now see all the phone numbers of your Facebook friends in one page. Go to 〖Accounts〗 on the upper right corner. Then 〖Edit Friends〗. Then, 〖Contacts〗 on the left. I'm seeing about 40 mobile phones of my friends.
Insider Look of Google Search with 3 Top Google Engineers
A very enjoyable video that gives a insider look at Google's search engine and how the team works.
It is in a format of a interview, featuring the well-known Google search quality engineer Matt Cutts, and engineer Ben Gomes (the man behind Google Instant and UI) and Amit Singhal (the “brain” of Google search engine). Danny Sullivan, of the searchEngineLand.com fame, is the moderator, and he asked great questions.
The video is ~90 minutes long, but very enjoyable and informative, easygoing.
- Google Search Problems; Alternative Search Engines
- Google's nofollow Rule
- Google Sidewiki Block
- Domain Names, Cybersquatting, Resell Market
- Why Does Google Give SEO Advice?
- Google Search Ranking Ingredients (SEO secrets)
- Google Chrome, SPDY Protocol, Browser War II
- Google Ice Cream; Can Google Be Trusted?
Ask me question on patreon