4 ms·
Most administrators are lazy. If you write software for thousands or millions of users, sane defaults are a must. I find it useful to keep Saint-Exupéry in mind
by currysausage 11y ago
Most administrators are lazy. If you write software for thousands or millions of users, sane defaults are a must. I find it useful to keep Saint-Exupéry in mind: "It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove."
Let's look at the first lines of WordPress's default template:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head profile="http://gmpg.org/xfn/11">
Why bother with xmlns if it's not well-formed XML anyway?
Why dir and lang if you don't really know what language the content is in? We now have the funny situation that most non-English pages wrongly declare lang="en-US" because W3C evangelists told template authors that lang is really important, rendering the attribute completely useless.
What the heck is profile="http://gmpg.org/xfn/11" http://gmpg.org/xfn/11" supposed to do?
- nissehulth 11y agoWhat "default template" would that be? As for the "lang" attribute, it is set to the language chosen when WordPress was installed.
- currysausage 11y agoOops, sorry, I was looking at the HTML of the theme previewer instead of the theme itself. With regard to WordPress, only my "XHTML friends network" point remains valid. Concerning web development in general, I have seen way too much cargo cult boilerplate, too many hardcoded lang attributes, etc.
- nissehulth 11y agoYeah, the value of "XFN" is debatable. But it's usually written as a link element that doesn't really break anything.
- josefresco 11y agoFirst 3 lines of Twenty Sixteen are: <!DOCTYPE html> <html lang="en" class="no-js"> <head> I checked back to Twenty Fourteen and didn't see the lines you referenced. Regardless, it's a silly argument, the default themes are "reference" themes, meant to show off all the features WordPress offers and of course don't represent all WP themes.