TrickJarrett.com

Posts Tagged: html

HTMLforpeople.com

The world has come a long way since days of HTML 1.0. This looks like a fantastic primer to learn HTML from scratch.

Share to: | Tags: html, programming, web development

"Old CSS, new CSS"

Oh this blog entry could have been written by me. I also learned to make webpages in the 90's before CSS. So much nostalgia and memories of our version of "walking up hill in the snow both ways."

Let’s say you wanted all your [h1]s to be red, across your entire site. You had to do this:

<H1><FONT COLOR=red>...</FONT></H1>

…every single goddamn time. Hope you never decide to switch to blue!

Oh, and everyone wrote HTML tags in all caps. I don’t remember why we all thought that was a good idea. Maybe this was before syntax highlighting in text editors was very common (read: I was 12 and using Notepad), and uppercase tags were easier to distinguish from body text.

Keeping your site consistent was thus something of a nightmare. One solution was to simply not style anything, which a lot of folks did. This was nice, in some ways, since browsers let you change those defaults, so you could read the Web how you wanted.

A clever alternate solution, which I remember showing up in a lot of Geocities sites, was to simply give every page a completely different visual style. Fuck it, right? Just do whatever you want on each new page.

That trend was quite possibly the height of web design.

Share to: | Tags: html, web development, programming, css

Discussion around XHTML and its impacts on HTML

A great walk down the journey of the evolution of HTML through XHTML to today's HTML 5. Specifically the author comes at it discussing how XHTML led people to self closing some html tags, such as:

<img src="[URL" />

The /> at the end is the part in question and he explains why it isn't required anymore; something I didn't realize and will happily begin ditching.

Share to: | Tags: html, programming

HTML to Markdown

We're officially a Markdown blog! For those unfamiliar with Markdown, it's a 'markup language.' That is, like HTML, it defines how a document will look - using a very simple system. I'll dive into why I'm doing this later in the post. For you all, you should see (almost) no change on the blog, most everything I discuss here is relating to the backend management of it.

A few days ago, I quickly worked out the code which would take every entry in the blog and convert them from HTML to Markdown. I also took the opportunity to fix some content errors in the site; though it's not all fixed. Before running the conversion, I did a lot of testing to be confident it wouldn't screw up the database - but, having done that, I still took an export of the database as backup before running it. You can never be too careful when dealing with something that could potentially ruin your website.

This morning, after the entries in the database were converted, I switched my admin interface to a different editor which supports Markdown. I am currently going with Editor.md which looks to be a markdown editor made for the Chinese market. It's quite robust, though I have a few things I still need to figure out. Such as, when writing this post, I went to use a modal and the UI popped up in Chinese! Whoops. Thankfully it was a quick fix as they provide a bit of code which fully translates the UI into English.

Once the editor was in place, and I had confirmed all of my normal admin functionality worked, I then finished implementing the publishing which would turn the Markdown into HTML. Thankfully the Parsedown library for PHP is robust and simple. It only took a few lines of code to implement it.

That was it. Overall, very straight forward, and now my blog is future proofed. The future-proofing is one of the major upsides of using Markdown.

The editor I was using before was called Quill, and while it's a very powerful rich-text editor,the HTML it created was not perfect. This isn't a problem limited to Quill, many rich text editors struggle with this. I still remember the nightmare code that Microsoft Word would produce if you saved your document as an HTML file. So, with Quill, I was having to do code cleanups and figure out workarounds for some of its quirks.

Ultimately, this is not a huge thing. Many other blogs store their posts in HTML. I just like knowing it is in Markdown for flexibility. And, making Markdown the core structure of the backend enables me to potentially do some other things for inputting new entries. Dave Winer, the father of RSS, has a neat thing he put together where he can tweet a thread in markdown and his blog will pick it up and import it as an entry. I don't currently plan to do that with this blog, but it's an example of where making Markdown the editorial core enables some greater flexibility.

Share to: | Tags: programming, html, markup, glowbug

This morning I laid the groundwork to convert all my posts over from HTML in the source code to Markdown. While I don't expect HTML to go anywhere as far as languages go, I think the simplicity and portability of Markdown has a lot of advantages. It will also lay the groundwork for me to more easily upload posts to this blog when I write them on my mobile devices if offline, or just as part of different workflows.

Share to: | Tags: glowbug, programming, markdown, html