Tuesday, March 1, 2016

Do You Know These Eight HTML5 Tags?

As a web developer, you will probably take advantage of a whole range of different tags when putting together your next site build. Chances are high that you are already well versed in some of the commonly known tags introduced in HTML5 such as <article>, <header> and <footer>, however you might not be aware of some of the lesser known / edge case tags you could be taking advantage of.

Some of these tags are either brand new in HTML5 or have been repurposed from the HTML4 specification. Tags repurposed from HTML4 may look familiar, however they have been given new meanings and have had changes in how they should be used.

For each tag, we will go through what the W3C specification says and apply a practical example to showcase how you might use it. Let's roll!

A Quick Word on Interpretation

While the W3C specifications are great for conceptual overviews, sometimes they lack practical examples, which makes it challenging when searching for the best way to use some of these tags.

You might have used some of these tags before — perhaps just not in the same way. There often are no hard and fast rules about what is considered good practice. The following are some examples of how I recommend treating and using these lesser known elements.

1 - Contextual Highlighting With <mark>

The specification for the <mark> tag says that this tag should be used to denote "relevance" or "scrutiny".

“Relevance’ is hard to describe. Elements and text are relevant when we are performing an activity and they are useful to us at that moment (or could be useful in the future).

For example, if you searched a site with the keyword “jQuery” and several articles showed up, you could wrap the resulting matches inside the <mark> tag. The purpose of the mark tag is to say to the browser “hey, this thing right here is relevant to what you are doing”.

Practical Examples

We can use the mark tag for highlighting content that is relevant. To illustrate, consider the following scenario:

We are on a page called “Cheapest Holiday Packages” and it shows us a grid of holiday packages sorted by price range. It starts off from the cheapest at the top to the most expensive at the bottom.

For the top level holidays, the price itself could be highlighted with the <mark> tag because we have come to this page for cheap holiday deals and these are the cheapest the page has to offer — they are the most relevant.

[code language="html"]
<section class="deal-list">
<article>
<h2>Vanuatu Cruise</h2>
<p><mark>$499</mark>- 5 Nights</p>
<p>A relaxing cruise around the southern most
parts of Vanuatu</p>
</article>
<article>
<h2>Fiji Resort Getaway</h2>
<p><mark>$649</mark> - 6 Nights</p>
<p>Includes all you can eat buffet and
entertainment</p>
</article>
<article>
<h2>Pacific Island Hiking</h2>
<p>$1199 - 5 Nights</p>
<p>Hike your way though several pacific islands
on this exercise focused holiday</p>
</article>
</section>
[/code]

See the Pen Mark Tag Example by SitePoint (@SitePoint) on CodePen.

For the first two results, the price (which is what we are focused on) is wrapped within the <mark> tag. However the third result — which is much more expensive — isn’t marked as it isn’t as relevant as the others.

Best Practices and Considerations

While people generally associate this tag with a quick way to style something, that isn’t correct. It should not be used just for styling purposes, you should be another element like a <span> for that.

Do not use this tag to denote textual importance or to highlight strength — that is what the <strong> tag should be used for. Use <mark> when you want to pinpoint something of relevance to the current user.

As a side note for accessibility, mark highlights are shown by the browser when using Windows
High Contrast mode, so it works well in that regard too.

2 - Lower Importance With <small>

You have probably used the <small> tag before. It does exactly what you think it would do, which is make your text smaller. While browsers might make your text smaller, that is actually a byproduct of using the small tag, rather than its semantic meaning.

The specification for the <small> tag explains that this tag should be used to lower the importance of text or information. Browsers interpret this by making the font smaller so it has less visible impact.

This tag should be used to denote low importance when it comes to content or information. Information of low importance is generally used in the footer of a website or in a sidebar (away from the main content of the page).

Practical Examples

Overall your usage of the <small> tag should say to the browser — “This content right here isn’t really important in the grand scheme of things”. For example, in the footer you could use this for your legal attribution and copyright:

[code language="html"]
<footer>
<small>
Designed and developed by Simon Codrington.
</small>
<small>
&copy; 2016 My Company - All rights reserved
</small>
</footer>
[/code]

You can even use the <small> tag inside regular content to denote that the content is not as important as the content surrounding it. For example, in a product listing you could include the legal disclaimer “Excludes tax” near the price of a product as follows:

[code language="html"]
<section>
<article>
<h3>Woolen Llama Print Jumper</h3>
<em>$65.99</em><small> - Excludes tax</small>
<p>
A warm, woolly jumper made from 100% llamas.
You will love the warmth.
</p>
<button>Add to cart</button>
</article>
</section>

[/code]

See the Pen Small Tag Example by SitePoint (@SitePoint) on CodePen.

Overall if you want to make something have a perceived lower importance use <small>. Don’t just use it to control the size of elements.

Best Practices and Considerations

You cannot lower the importance or emphasis of content that has been affected by the <strong> or <em> tags. Styling the <small> tag might affect its visual look (depending on the browser), but it will not affect its semantics.

3 - Quotations With <q> and <blockquote>

While you might use a styled <div> or <span> to enclose your quotes, a better way is to use either the <q> or <blockquote> tags. Both of these are meant to be used for external quotations (when you are quoting something), but they differ in how you should use them.

According the spec, the <q> tag should be used to define a "short inline quotation" of text.

The <blockquote> tag on the other hand should be used for large spans of text.

In practice, you should be using the <q> tag for smaller quotes and using <blockquote> for everything else. Keep in mind that these are for quotes or resources only, they should not be used just for stylistic purposes (use spans for that).

Practical Examples

Lets look at how we can use both of these tags.

If you have a small quote, use <q>:

[code language="html"]
<div class="big-banner">
<h2>Try our latest sandwich!</h2>
<p>Come and try our latest, biggest and tastiest
sandwich. John Smith told us <q>he hasn't eaten
anything as good in his whole life!</q></p>
</div>
[/code]

If you have a longer quote, or something more complex you can wrap it inside <blockquote>

[code language="html"]
<div class="motivational-quote">
<blockquote
cite="http://bit.ly/1pbvjsL">
Infuse your life with action.
Don't wait for it to happen.
Make it happen. Make your own
future. Make your own hope.
Make your own love. And
whatever your beliefs, honor
your creator, not by passively
waiting for grace to come down
from upon high, but by doing
what you can to make grace
happen... yourself, right now,
right down here on Earth.
<cite>Bradley Whitford - Author</cite>
</blockquote>
</div>
[/code]

For the above example we’ve wrapped a long quote withing the <blockquote> tag and supplied both the cite attribute (the link to the resource) and the <cite> tag (explaining what this resource is).

Continue reading %Do You Know These Eight HTML5 Tags?%


by Simon Codrington via SitePoint

Quick Tip: Installing the Android SDK

To develop Android apps you will need the Android SDK (Software Development Kit) installed on your machine. As there are several different ways to do so, in this quick tip I will present the options available and why you might want to choose one over another.

Continue reading %Quick Tip: Installing the Android SDK%


by Donald Dragoti via SitePoint

How to Offer Great UX When Using Video

Video in web design was anticipated to be a top trend in 2016, and what was once thought of as impossible is now a widely-consumed concept by users in certain industries. Video is designed to captivate the user emotionally so this trend mostly applies to travel websites, hip startups and e-commerce stores selling luxury items.

In short, video can bring a sensual notion of a time and place that still photography can struggle to match.

Airbnb’s video-based header Airbnb’s captivating video-based header depicts how “at home” you can feel by choosing an Airbnb over any other type of accommodation.

But video can be heavy, in terms of both of megabytes and screen real estate, and it should be used with extreme caution. Let's take a look at some of the ways that we can make websites with video more accessible to the average user, and much more accessible to the more-common-than-you-might-think disabled user.

How Much Real Estate Should Video Acquire?

Video can be a high-risk web component, but it isn’t hard to maximise its effect and optimise its user experience. Most of the decision-making comes down to “how big should it be?”, and the answer solely depends on exactly what you’re using it for.

Ambience Videos

While most “hero” headers tend to use big background images, videos are becoming more commonplace too. How these differ from “explainer” videos is quite clear. Ambience-style videos don’t take a central focus on the webpage; the colours, speed, tone, mood and overall impression subtly induces emotional feelings, leaving the user with a desire to keep reading and scrolling.

Ambience videos are usually full-screen, and in-turn of lower quality; this is to keep the webpage size low and the loading times fast. Sometimes they’re blurred or even abstract - as long as they make you feel the way the website wants you to feel.

Ambience videos

Here’s an example: a travel agent website selling luxury island holidays may want you to feel adventurous, so their video might slowly transition between various scenic island destinations with soft lighting and relaxing hues, making you feel as if you were literally right there in the moment. It can make all the difference between “Ah! Yes! Please!” and “Ehhh, maybe someday.”

Explainer Videos

Explainer videos (which are smaller/not full-screen) have been around since as far back as I can remember. Historically, they’ve converted very well and they’re usually set in the middle of the hero header, but other emerging trends (like card-based design) have allowed us to use video in smaller, more modest ways.

Explainer videos

Facebook videos are now set to autoplay but no sound will be appear unless you imply in some way that you’re watching the video, such as full-screening or interacting with the video.

I adore this kind of non-invasive functionality and we’re now starting to see it in effect with card-based designs, meaning compact, user-friendly videos that can be combined with text alternatives to satisfy a wider crowd. And that’s a huge deal.

HubSpot’s card-based videoHubSpot’s multimedia card-based approach.

Autoplay functionality helps those with motor disabilities to interact more easily with video media, but the overall reduced frame of the component means that we can sum up the video in text side-by-side, sort of like visual alt attribute. Video doesn’t have to be invasive anymore; it can heighten the experience without warding off users with simpler needs.

Multimedia websites allow catering for all types of users.

Continue reading %How to Offer Great UX When Using Video%


by Daniel Schwarz via SitePoint

Notifier – jQuery Notification Plugin

Notifier is a jQuery plugin to push notifications on your webpages.


by via jQuery-Plugins.net RSS Feed

Vote Zoo Brew

Vote Zoo Brew

Fun interactive One Pager where you get to vote on which animal adapted president you want to win. Nice little touch with the "pub" highlight within republicans;) Good bit of marketing this by the annual Jackson 'Zoo Brew' festival.

by Rob Hope via One Page Love

The “Most Loved” One Page Websites in February – presented by RGen Bundle

r-genesis-logoFebruary’s “Most Loved” One Page website round up is brought to you the RGen Landing Page Bundle.

The ‘RGen’ bundle is a collection of HTML landing page covering pretty much any industry. Can you believe for $16 there are 37 different landing page layouts including digital agency, apps, books, gyms, real estate, yoga, travel, finance and many more.

Definitely take a look at their landing page builder that helps combine any combination of sections within your One Pager. Also good to know there is neat integrations into newsletter software like MailChimp, Campaign Monitor and more.

If you want to receive these “Most Loved” awards in your inbox each month, subscribe to our Inspiration Newsletter.

Below are 6 One Page websites we awarded “Most Loved” in February – hope you enjoy!


Valio Con 2016 (Event)

Beautiful One Pager for the 2016 ‘Valio Con’ to be held in San Diego. The long Single Page website features gorgeous parallax scrolling speaker cards that include great photos, their bio and social links. The responsive adaption is solid too and the site retains the parallax effect but doesn’t feel over-the-top. Quite a neat footer feature too that includes links to the previous event sites with speaker videos.

Launch Website
Full Review


How much is your spare time worth? (Experimental)

Real fun interactive One Pager that works out your hourly rate based on a bunch of online tests. The illustrations are great and transitions smooth. Lovely bit of marketing this by Finn that, at the end of the quiz, promotes outsourcing labour tasks to free up your valuable time. Smart.

Launch Website
Full Review


Leo’s Red Carpet Rampage (Game)

Hilarious arcade-themed One Pager that hosts Leo’s Red Carpet Rampage, a game where you race down the red carpet on a quest for Leonardo DiCaprio’s ultimate award. Smart bit of marketing this by The Line digital agency in London.

Launch Website
Full Review


Uber Brand Experience (Informational)

The Uber ‘Brand Experience’ One Pager features lovely parallax scrolling effects and well integrated video elements.

Launch Website
Full Review


Flying Piñata (Product, iPhone App)

Beautifully designed One Pager promoting a new startup that delivers piñatas via drones. Make sure you watch the video too – hilarious and really well made. Excellent work as usual by Bakken & Bæck.

Launch Website
Full Review


SHFT (Product)

Parallax scrolling landing page promoting a running product called ‘SHFT’ that links out to their store on Shopify at the end. Make sure you check out the slick off-canvas navigation transition. Also a lovely subtle fade transition that brings in the newsletter signup section. Lovely work this by Umwelt from Denmark.

Launch Website
Full Review


Hope you enjoyed our February Round-Up by RGen Landing Page Bundle! Why not give this a RT if you want to help spread the love:)


by Rob Hope via One Page Love

Sorry, Your Instagram Shots Are Just Okay

Sorry, your Instagram shots are just okay

Move over, Annie Leibovitz—SitePoint-approved pro photographer coming through. Okay, so you might not be stealing any jobs away from Annie after you grab our Pro Digital Photographer & Photoshop Bundle. But you will pick up new skills, polish old ones, and learn how to take (and edit) amazing photos. Get the bundle for $29 and save 96%!

Get over 30 hours of training in manual photography and Photoshop. Developed by leading pro photographers, the course will take you through every button and setting on your camera, help you master exposure, and teach you the ins and outs of night photography, travel photography, portrait photography, fashion shoots, and more. Then, polish up your shots with Photoshop skills like whitening teeth, giving them a magazine look, and adjusting color. This course will even teach you how to set up your own photography business, should you decide to go pro.

Grab the Pro Digital Photographer & Photoshop Bundle for $29 at SitePoint Shop!

Continue reading %Sorry, Your Instagram Shots Are Just Okay%


by SitePoint Offers via SitePoint