The modern web should be 100% responsive and newer libraries are making this increasingly possible.
With free plugins, such as ResponsifyJS, it’s even easier to get your websites working on all devices. This free jQuery plugin takes a container of images and dynamically rearranges them based on varying screen sizes.
How To Use HTML5 <picture> Element To Achieve Responsive Image
Responsive Design may be here to stay but there are many issues that need to be addressed when…Read more
Since different containers hold images differently, they can resize in very strange ways. Sometimes, you’ll have photos of people and their faces can get cut off when resized on mobile.
The Responsify plugin was created to solve this exact problem. It can work automatically but the true magic lies in defining your own focus area on the picture.
It uses an internal system of decimal descriptions to find where the focus of the image should be. For example, you can define positions such as data-focus-top which “blocks in” a certain segment of the image.
This data needs to be passed in the form of decimals, for instance a .5 decimal targets 50% of the image (left/right or top/bottom). Naturally, this is pretty confusing to do by yourself. But, there’s a free Responsify app that lets you calculate the positions dynamically in your browser.
Just upload a picture, define the focus area, then copy/paste the image code into your website. The Responsify plugin will have all the data it needs to properly resize the image on smaller screens.
You can find quite a few live demo links in the GitHub repo, including code snippets to copy/paste into your site.
This plugin is not the perfect solution for every project. Sometimes, you’ll want images to resize without fixed focus areas. But, if you’re using masonry grids with jQuery it doesn’t hurt to add ResponsifyJS to your stack.
To learn more, visit the plugin homepage for a live demo, a download link, and a full setup guide.
The largest social media sites have practically taken over the world, with Facebook currently pushing towards 2 billion users worldwide.
One of their many advancements in technology is the Open Graph or OG protocol. These OG tags have become the norm on other social networks such as Pinterest and LinkedIn, so having them on your site can be tremendously beneficial.
And now, with the Mega Tags web app, the entire process can be automated, without writing a single line of code.
By default, there are two different “types” of social meta tags: Open Graph covers most networks but Twitter has their own called Twitter Cards.
These extra tags share information with social networks, so you can customize how your links appear when shared on these sites.
Networks, such as Facebook, have their own algorithms for pulling a page’s title, description, and thumbnail. This is useful when people share links on FB and other social networks.
With these meta tags in your header, you can tell Facebook, Pinterest, Google+, and others exactlyhow to display your content.
Some websites might even have a Facebook page which can be included in the Open Graph content. This offers even more control where Facebook can pick & choose which data they want to present.
This free web appcan do it all for you by default. Just enter your page URL, the title/description, and include a thumbnail image if needed. You might also dig into the optional settings if you want.
From there, you can copy/paste the meta tags into your header and voila! A fully compatible Open Graph page ready for sharing.
The site even has validators with which you can check to make sure your page is being validated properly on all your chosen networks.
And, you have access to a full reference page with a table of all OG properties and expected values. Some of these properties may change over time or new features may be added to the Open Graph protocol.
But, so many sites already use these features, so you’d be crazy not to! To get started, just visit the web app, add your site info, and copy/paste the code into your page header. You’ll notice an immediate difference whenever people share your links on social sites around the web.
Firefox 54 Could Very Well be Mozilla’s Best Browser
There was a time when Mozilla’s Firefox browser was the browser of choice for those who refused to…Read more
For the most part, the Firefox Focus experience on Android is very much the same as the one that can be found on iOS devices. Firefox Focus for Android retains all of the features that makes the browser a great alternative such as the ability to block ads, analytics and social trackers.
Also, in the Android version of Firefox Focus is the ability to disable the custom web fonts on a website to make web browsing even faster, as well as an Erase button that lets you wipe your browser clean on-demand.
Unfortunately, some of the browser’s demerits are also present on the Android version as Firefox Focus has yet to implement a tab browsing.
While the Firefox Focus experience is largely the same as the iOS version, the Android version of the browser did receive some new tricks. Android users are given the option to set Firefox Focus as their main browser, a feature that isn’t available to iOS users.
In addition, Firefox Focus for Android now comes with a reminder notification that lets its users erase their browsing history without even needing to be on the browser.
Gboard for Android users will no longer need to scroll through the entire emoji library to find that specific one they need as an update Google has enabled the keyboard to make emoji search a lot easier.
Gboard has been available for iOS devices since August as a third-party app, giving iOS users access to…Read more
So how did Google improve upon the emoji search? By using the power of doodles! Now, when you access Gboard’s emoji tab, you’ll be able to see a handwriting icon located inside the emoji search box.
Tapping on it will open up a blank space in which you’ll be able to draw an image of the emoji you’re looking for. As you doodle on the space, Gboard will publish a list of emojis that may fit the image that you’re currently doodling. Once the emoji you want appears, all you need to do is tap on it to add it to your message.
Doodle-powered emoji search aside, Gboard for Android has also received improvements in other areas as well. For those who frequently text messages to others, Google has implemented a feature called phrase suggestions to Gboard.
Powered by machine learning, this system will allow Gboard to suggest phrases that would connect naturally with the sentence that is currently being constructed.
Finally, Google has made the keyboard’s search functionality a lot more useful as it can now showcase multiple results. In addition to that, Gboard can now launch the necessary app or service depending on the search result that you’ve selected. For example, if you were to select a YouTube video, Gboard would automatically boot up the YouTube app.
For a language so simple and easy to learn, HTML surely offers an unexpected amount of useful features, many of which most of us don’t even know about. It’s hard to keep up with times and you may think that all “you might not know” articles must be about the most recent tags, HTML also has some quite helpful features that are already around for a while.
From checking spelling to adding keyboard shortcuts, in this article, I’ll show you five less-widely known HTML features.
The HTML specification got a major overhaul a couple of weeks ago when W3C published its new HTML…Read more
1. Check spelling as you type
The spellcheck attribute prompts browsers to check spellings while a user is typing an element. This attribute is global, meaning, you can add it to any HTML tag.
However, it only works on elements that can take text input. Having it global is useful because it can be inherited by child elements. For instance, add it to a <div> tag and all of its child elements that take text input will inherit this attribute.
Spell checking works on all text <input> types: text, search, url, and email. It also works on <textarea>, and editable elements (elements with contenteditable attribute).
Its value can be an empty string, true, or false. The empty string and true will enable the spell checker.
<input type="text" spellcheck="true"
placeholder="Type something here">
<p contenteditable="true" spellcheck="true">
Type something here
In the above code, both the <div> and <p> tags will check spellings when a user is typing into them.
If the user has disabled spell checking in the browser settings the spelling won’t be checked, even if spellcheck was added.
2. Be safe from compromised CDN resources
It is pretty common to host resources, such as scripts and stylesheet files, through CDNs. But, if the CDN gets compromised, so do those hosted files, and if any fetched resource is compromised on your website, so does your site!
… using CDNs also comes with a risk, in that if an attacker gains control of a CDN, the attacker can inject arbitrary malicious content into files on the CDN (or replace the files completely) and thus can also potentially attack all sites that fetch files from that CDN.
Now, whenever a web page of your site with the above code has to load example.js, the browser first applies the hash function, and loads and runs example.js only when its hash value matches the integrity value.
If example.com was compromised and example.js was interfered with then the hash value of example.js won’t match the integrity value.
Most common CDNs already provide SRI integrity values, but you can also generate one here.
3. Override form targets in submit buttons
You’re most likely familiar with the target attribute, the one that decides where a hyperlinked resource opens, for instance on the same page or in a new tab. You might also know that the same target attribute used in the <form> tag decides where the response from the form submission is shown.
In one of the early drafts of HTML5, formtarget was defined along with four other form submission attributes: formaction, formenctype, formmethod, and formnovalidate.
These attributes can be used with submit buttons, and they override their respective attributes in the <form> tag to which the buttons belong to.
So, when a form is submitted using a button that has a formtarget attribute, the response is shown according to the formtarget value, instead of the target value of <form>.
In the above code, when the form is submitted using the second submit button (print ), the response will appear in a new browsing context, like in a new tab.
4. Hide elements semantically
When it comes to hiding elements, we all went through different phases of hiding elements: using opacity:0, visibility:hidden, height:0; width:0, display:none, text-indent:-999px in our CSS file.
Each method has its purpose, none of them are redundant, and so isn’t this one: the hidden HTML attribute. If an element has hidden specified on it, it’ll be hidden.
It works the same way as the display:none; CSS rule; the element with the hidden attribute doesn’t get rendered on the page. Any script inside the element will be executed, and if it’s a form control it’ll be submitted along with other form controls during form submission.
However, the benefit of hidden is that it’s semantically appropriate, after all, HTML5 is all about semantics and hidden is part of the HTML5 entourage!
Moreover, when an element is hidden, it’s to be hidden in all platforms, not just in web browsers but in screenreaders, TV, projectors, etc.
It’s also not style-dependent, even if you strip away the author CSS from a page, the element will remain hidden. Whereas in the case of display:none; that won’t happen. So, think of hidden as the ironclad version of display:none;.
5. Add keyboard shortcuts
The accesskey global attribute was already defined in HTML4 and it creates a keyboard shortcut with which the user can operate an element on the page.
The key combination for a shortcut will depend on two things:
the accesskey value that we give to an element
the pre-assigned keys used by a browser for the same element
Glot.io is a new contender, focusing on dozens of programming languages that usually require runtime software. These languages go far beyond the web, including C#, Java, Swift, Haskell and a whole lot more.
Glot is a coder’s web-based paradise and it works like an open-source playground with executable code. Granted, there are some limitations on what you can run, especially with GUI programs and 3rd party libraries. But, you can save pretty much anything in this site and share it with the whole world. For free!
With so much of the traditional, desktop-based productivity software we know and love moving to the Cloud, it’s…Read more
If you’re looking for sample snippets you can browse the Glot snippets page with whatever language you prefer. For instance, if you’re building an iOS app you can search snippets by Swift code to see what’s out there.
Most snippets are pretty old and they’re all very simple. However, Glot isn’t just a free code library. You can also use it to test new ideas by writing code and testing it on the fly without a compiler. No other web app offers this kind of functionality with so many languages for free.
So, who would get the most value from using Glot?
Newer coders might find some gems in the snippet archives but, truthfully, there aren’t many archives to sift through. I think Glot is most useful to practicing coders who want an online environment for testing their ideas.
It can be tough when you’re starting to learn Python or C# or any detailed programming language. These online code environments let you practice from any computer with Internet access, no software required.
The site’s code and many tools are also freely available on GitHub. You can find them all listed in this index repolinking to all the Glot.io open-source projects.
Glot.io is a really cool web app and quite valuable to newer developers. If you’re looking for a cheap way to hone your programming skills Glot offers everything you need to get started.
Are you the type of person who likes to keep track of their activities over the course of a trip? If so, Facebook’s latest update to its Albums feature will make it so much easier to keep a log of your tours or trips as it now lets you store photos, posts and more in it.
How to View Facebook Photos, Pinterest Style [Quicktip]
Imagine if you can categorize your Facebook feed to have a photo-only section, and change the display setting…Read more
Add videos, check-ins & posts
Available on both the desktop and Android version of Facebook, with iOS support coming soon, the new Albums feature now lets you add videos, check-ins and text posts into the album, alongside the usual photos of course.
Co-edit albums with friends
In the event that you would like your friends to edit the album with you, Facebook has also made it easier by enabling your friends to collaborate with you on an album.
Simply toggle “Add Contributors” option on, tap on the “Choose Friends” option, and select the people that you want to be collaborating with you. Once that’s done, your selected friends will be granted permission to modify the album.
To make your album standout even more, Facebook has also introduced a “Featured Albums” tab on your Facebook page. Much like the Featured Photos option, the Featured Albums tab lets you place a number of your available albums directly to your main Facebook page, making it easier for friends to view it.
Follow a friend’s album
Finally, Facebook has also added an option that allows you to follow a friend’s album, making it easier to keep track of your friend’s activities. All updates that are posted in the followed album will appear on your News Feed, much like a regular Facebook post.