HTML


Links, URLs, and embeds

It surprises me how many writers don’t understand how links work. Here’s a brief guide on some technical (but not too technical) points.

The structure of a URL

Understanding HTML isn’t essential to writing an article. Usually you work in an editor that takes care of those details. But you can’t get around understanding links. A link uses a uniform resource locator or URL. Here’s what it looks like:

https://www.example.com/path/file

(more…)


The target=_blank security issue

There’s a little-known security risk built into the design of HTML. It concerns links that open in a new tab or window. You make it happen by specifying target="blank" in an anchor (a) element. For example:

<a href="something.example.com" target="_blank">

The trouble is that when you do it, you put the page containing that link at risk. For some bizarre reason, the designers of HTML decided that the destination page should gain access to the window.opener property of the source page. This gives the target page — the one run by someone else considerable control over your page. For instance, it can redirect your page to another URL.
(more…)


Getting links right

Links are important in blog posts and Web pages. They give support to statements and lead the reader to further information. They make the page more valuable and trustworthy in the reader’s eyes. Broken links, on the other hand, make a page look dubious and outdated. A writer needs to pay special attention to get the links right.

Anatomy of a URL

Links are URLs (Uniform Resource Locators). They consist of a protocol, normally HTTP or HTTPS, plus a domain and a path. They may also contain parameters. For the article you’re reading, the protocol is HTTPS, the domain is garymcgath.com, and the path may vary depending on how you’re viewing the piece. The protocol is a mandatory part of the URL. garymcgath.com is not a URL, and putting it into a link will work only if the server is kind enough to fix it for you. https://garymcgath.com is a URL with an empty path. https://garymcgath.com/wp/blogging is a URL that points at my blog.
(more…)


“Link juice” and other content marketing superstitions 1

Small minds are attracted to zero-sum thinking. They believe that anything that benefits someone else must hurt them. That’s where the myth that sites should never expend “link juice” comes from. The idea is that if you have any links in your articles, the site you link to will gain in search rank and you’ll lose correspondingly.

How much influence do these people think they have over search ranks? Unless they’re operating a leading site in the field, their effect is negligible. Besides, presumably they aren’t linking to their competitors, so giving another site a slight boost doesn’t do them any injury.
(more…)


HTML for blog writers

If you write for websites, you need to know the basics of HTML. Even if you do your writing in Microsoft Word, Open Office, or a Web editor, it will get turned into HTML (or, less often, PDF). You need to understand how it will work in its final form.

HTML is a markup language. It’s text which contains plain human language plus tags that tell the browser how to render it. The tags are more guidelines than rules. They indicate an intent rather than dictating an exact appearance. In different browsers, or even different settings in the same browser, you might see differences in fonts, spacing, colors, and so on.
(more…)


What writers should know about HTML

When you’re writing for the Web, usually your material will end up as HTML. With modern online editors, you may never have to write it directly, but you still need to understand it. The formatting of your writing has a close relationship to the final HTML, however it’s dressed up.

Properly using HTML tags helps a page’s accessibility. Browsers may present the content as spoken text, with enhancements for readability, or otherwise modified. Mobile browsers will present it differently from full-sized ones. Good markup will let all representations of the page work better.

HTML markup should focus on the semantics of a document. The site will use CSS to make it look however the webmaster wants. Tags shouldn’t determine how an element looks, but what role it plays. There are several common mistakes, and they cause problems in the final page.
(more…)