Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

How to use an HTML boilerplate: A guide

Although websites are all unique from a content and design perspective, the underlying foundations of the vast majority of sites are very similar. Using an HTML boilerplate for the initial work is a great way to save time and effort, and here we'll show you how you can use one to kick-start your website projects.

Typically, site designers and developers want to deal with the quirks of individual browsers, stripping out any proprietary styling that such software might add to specific website layout elements. Additionally, they may use scripts to deal with the shortcomings of older browsers and drop in basic default styles for horizontal rules and elements that are supposed to be hidden.


Doing this again and again for every project is a massive waste of time and energy. Not only will you mostly be repeating yourself, you might also make unique errors during every attempt to start afresh. An HTML boilerplate gives you something ready-made to work with, thus avoiding the horror of staring at a blank document and trying to figure out where to begin.

What is an HTML boilerplate?

Boilerplates are similar to templates, but more helpful, in that they often contain text and graphics to start you off rather than just layouts that include these elements. An HTML boilerplate is a set of downloadable files that provide a foundation for any website you might want to create. Typically, they have been built by industry professionals but freely released to the community. Adapting them for your own projects helps speed things up and ensure the basics of your site are sound.

Note that the term 'HTML boilerplate' doesn't mean you just get an HTML document or even a bunch of them. Boilerplates may contain a range of file types, including HTML documents, but also add CSS, JavaScript, placeholder images, and documentation on how to use what you've just downloaded.

Popular boilerplates

HTML5 Boilerplate is a good place to start. The self-described "web's most popular frontend template", is a sleek and simple HTML5 template that's the result of the pooled knowledge of hundreds of developers. It provides the basic scaffolding or framework for building an entire website.

We're on version 7 at the moment, but you can get a gist of how this works by watching the introductory video designed for v5. The latest version is mobile-friendly, with an optimised Google Analytics snippet and minified versions of jQuery and Modernizr included.

Another popular option to explore is Bootstrap. This calls itself a 'frontend component library', and offers more comprehensive options than the HTML5 Boilerplate framework. Some argue that the industry's reliance on Bootstrap has led to increasing homogeneity in web design over recent years.

Whether you opt for a simple HTML5 boilerplate, or something that offers more control, will depend on your level of ability, confidence and needs.

Using HTML5 Boilerplate

When downloaded, this free, open-source boilerplate provides you with documentation and licensing information, some CSS, placeholder images in various aspect ratios, two HTML files, some JavaScript, and some server config files.


On downloading the archive, it's a good idea to make a copy and keep it clean and untouched. It can then serve as reference for any changes you make.

For your new site, first replace the favicon.ico and icon.png files with your logo – these will appear as your site's favicon and the icon when your site is saved to someone's iOS homescreen. An online generator can help you create new images.

In the HTML, there might be some things that you're not familiar with. The majority of these additions deal with issues relating to legacy browsers. The final script element is for Google Analytics and can be removed entirely if you don't use that. Leave the other script elements that are found towards the end of the file, because they load jQuery.

Add content to the body of the document after the 'Add your site or application content here' comment. You'll also need to give the page a title and fill the 'content' value in the 'description' meta tag.

Note also that all links are relative in this document, and so you may need to change them to root-relative or absolute links if you start nesting web pages in folders.

You can add comments if you make any major changes to the HTML, to remind yourself later.

CSS edits

Of the two CSS documents included with HTML5 Boilerplate, there's no need to touch normalize.css. This is the reset document that ensures all browsers start on a level playing field when it comes to your website. By contrast, main.cssincludes what the document terms "opinionated defaults", including some basic styles for selections, horizontal rules, images, and forms, helpers for item visibility, and @media rules for responsive web design and print.


Everything here is fair game for updating, although carefully consider whether you should do so. There's an area set aside for the author's custom styles (ie, yours) or you could create an entirely separate CSS document and attach that to your HTML as well.

Whatever your choice, be mindful of how you'll deal with subsequent updates to HTML5 Boilerplate itself. If you edit any of the default main.css styles, changes made in future versions of HTML5 Boilerplate (which would either be added by replacing files, or replacing parts of files) won't necessarily come across to your site, or will override your own edits. Therefore, again make use of comments for any changes, thereby making later comparisons much easier.

Advanced boilerplates

Once you gain experience, it's worth considering a custom build using Initializr, retaining the components you need and ditching those you don't. Also, if you're creating a WordPress site, explore a WordPress-specific blank theme, such as HTML5 Blank.


These downloads and services are all free, so you can check out and experiment with them at your leisure.

Still, whatever you do, a little work and investigation now should save you a whole lot of time later, when you just pull out your boilerplate to get cracking on a new website.
Share:

How to use an HTML boilerplate: A guide

Although websites are all unique from a content and design perspective, the underlying foundations of the vast majority of sites are very similar. Using an HTML boilerplate for the initial work is a great way to save time and effort, and here we'll show you how you can use one to kick-start your website projects.


Typically, site designers and developers want to deal with the quirks of individual browsers, stripping out any proprietary styling that such software might add to specific website layout elements. 

Additionally, they may use scripts to deal with the shortcomings of older browsers, and drop in basic default styles for horizontal rules and elements that are supposed to be hidden.
Doing this again and again for every project is a massive waste of time and energy. Not only will you mostly be repeating yourself, you might also make unique errors during every attempt to start afresh. An HTML boilerplate gives you something ready-made to work with, thus avoiding the horror of staring at a blank document and trying to figure out where to begin.

What is an HTML boilerplate?

Boilerplates are similar to templates, but more helpful, in that they often contain text and graphics to start you off rather than just layouts that include these elements. An HTML boilerplate is a set of downloadable files that provide a foundation for any website you might want to create. Typically, they have been built by industry professionals but freely released to the community. Adapting them for your own projects helps speed things up and ensure the basics of your site are sound.

Note that the term 'HTML boilerplate' doesn't mean you just get an HTML document or even a bunch of them. Boilerplates may contain a range of file types, including HTML documents, but also add CSS, JavaScript, placeholder images, and documentation on how to use what you've just downloaded.

Popular boilerplates

HTML5 Boilerplate is a good place to start. The self-described "web's most popular frontend template", is a sleek and simple HTML5 template that's the result of the pooled knowledge of hundreds of developers. It provides the basic scaffolding or framework for building an entire website.

We're on version 7 at the moment, but you can get a gist of how this works by watching the introductory video designed for v5. The latest version is mobile-friendly, with an optimised Google Analytics snippet and minified versions of jQuery and Modernizr included.

Another popular option to explore is Bootstrap. This calls itself a 'frontend component library', and offers more comprehensive options than the HTML5 Boilerplate framework. Some argue that the industry's reliance on Bootstrap has led to increasing homogeneity in web design over recent years.

Whether you opt for a simple HTML5 boilerplate, or something that offers more control, will depend on your level of ability, confidence and needs.

Using HTML5 Boilerplate

When downloaded, this free, open-source boilerplate provides you with documentation and licensing information, some CSS, placeholder images in various aspect ratios, two HTML files, some JavaScript, and some server config files.


On downloading the archive, it's a good idea to make a copy and keep it clean and untouched. It can then serve as reference for any changes you make.

For your new site, first replace the favicon.ico and icon.png files with your logo – these will appear as your site's favicon and the icon when your site is saved to someone's iOS homescreen. An online generator can help you create new images.

In the HTML, there might be some things that you're not familiar with. The majority of these additions deal with issues relating to legacy browsers. The final script element is for Google Analytics and can be removed entirely if you don't use that. Leave the other script elements that are found towards the end of the file, because they load jQuery.

Add content to the body of the document after the 'Add your site or application content here' comment. You'll also need to give the page a title and fill the 'content' value in the 'description' meta tag.

Note also that all links are relative in this document, and so you may need to change them to root-relative or absolute links if you start nesting web pages in folders. You can add comments if you make any major changes to the HTML, to remind yourself later.

CSS edits

HTML5 Boilerplate is a great way to save time when creating new websites. Of the two CSS documents included with HTML5 Boilerplate, there's no need to touch normalize.css. This is the reset document that ensures all browsers start on a level playing field when it comes to your website. By contrast, main.cssincludes what the document terms "opinionated defaults", including some basic styles for selections, horizontal rules, images, and forms, helpers for item visibility, and @media rules for responsive web design and print.

Everything here is fair game for updating, although carefully consider whether you should do so. There's an area set aside for the author's custom styles (ie, yours) or you could create an entirely separate CSS document and attach that to your HTML as well.

Whatever your choice, be mindful of how you'll deal with subsequent updates to HTML5 Boilerplate itself. If you edit any of the default main.css styles, changes made in future versions of HTML5 Boilerplate (which would either be added by replacing files, or replacing parts of files) won't necessarily come across to your site, or will override your own edits. Therefore, again make use of comments for any changes, thereby making later comparisons much easier.

Advanced boilerplates


Once you gain experience, it's worth considering a custom build using Initializr, retaining the components you need and ditching those you don't. Also, if you're creating a WordPress site, explore a WordPress-specific blank theme, such as HTML5 Blank.

These downloads and services are all free, so you can check out and experiment with them at your leisure. Still, whatever you do, a little work and investigation now should save you a whole lot of time later, when you just pull out your boilerplate to get cracking on a new website.
Share:

Use CSS Grid and Flexbox to build a responsive interface

What's it like moving from an agency to a start-up? Creative developer Steven Roberts joined Asemblr, a start-up in the corporate events space, in February after working at an agency. In his new role, he's focusing more on the user as head of user experience. We catch up with him to discuss the difference between startup and agency culture and preview his Generate London workshop, which will look at building a web-based music player.


How’s your new role going and how does working at a start-up differ from an agency?

It’s going great. We’re currently designing the next generation of the platform, which will be launching in the summer. While my previous roles were primarily advertising-based, now I’m designing software as a service (SAAS). The platform has a lot of moving parts, which have been a challenge to design.

There’s been a huge difference in the transparency of the company in terms of involvement. I know what I’m going to be doing for the next few months, whereas in an agency setting it could be day to day.

Working within a SAAS company, there’s one single focus instead of a number of projects flying around, which has been a change of pace for me. I’m also getting to be more of an advocate for the user in my new role, primarily because I’ve had far more time to learn and discover who the user is.

Have you discovered any cool tools along the way?

I’ve not had a lot of time to use many new tools but the standout for me at the moment is Spirit. It gives designers and developers the ability to create animations in the browser using a timeline, similar to Flash. The animations are running on GSAP in the backend, so the animations are really smooth and cross-browser compatible. Although currently in beta, the developer is hopeful for a full release soon. I’ve created a quick example of what you can do with it in just five minutes over on CodePen.

What’s the web-design scene like right now in the North-East of England?

It’s exciting. There are a number of companies in the Middlesbrough Boho Zone producing some wonderful work and working with high-profile clients. Hopefully this will attract and keep new and upcoming talent from leaving the area. There are also a number of great companies in Newcastle and a couple of conferences. Frontend NE, which is a local meetup, successfully put on its first conference this year. Design It; Build It (DIBI) runs events in Newcastle too.

How important is music in your life and why do you think so many web designers are in bands?

Music plays a huge part in my life. I’ve played guitar since I was 14 and have been in a number of bands. I find listening to music while I’m working to be productive, although sometimes I find podcasts to be good for concentration too. I think many of us are in bands because it’s another outlet for creativity. Being in a band also promotes teamwork, discipline, leadership and ownership, all of which are part of our jobs, so it’s easy to adapt to the band environment.

Tell us about the workshop you’ll be giving at Generate London.

I’m really looking forward to it; it should be a fun day. We’re going to be building a web-based music player interface inspired by the likes of Spotify and Google Music. I’ll be teaching the new CSS layout properties – CSS Grid and Flexbox – as well as utilising SVG as an icon system and, to top it all off, we’ll style the interface using custom properties in order to provide themes. We’ll be using very little JavaScript and concentrating on CSS and HTML to build a responsive interface for modern browsers.

Want to hear more from Steven Roberts on harnessing the power of the grid?


Steven Roberts is giving his workshop How to Build a Music Player Interface at Generate London from 19-21 September 2018

If you're interested in learning about how you can become a Flexbox aficionado or CSS Grid sensation, make sure you've picked up your ticket for Generate London.
A frontend designer and developer currently working as creative developer for Asemblr.com, Steven Roberts will be delivering his workshop – How to Build a Music Player Interface – in which he will show you how to build a Spotify-style music player that will scale to any screen size, as well as giving you a firm grounding in Flexbox, CSS Grid and SVG sprites.
Share:

Start your front end engineering career

This online course will help you take your first steps into a new career.

Hoping to transition into a new career in 2019? If you've been dreaming of upping your income and working as an engineer, this online course bundle will have you on your way to becoming a front end engineer in no time. The Ultimate Front End Development Bundle typically retails for $1016, but is currently 96% off at just $39.


Engineers are more in-demand than ever before. Now is the perfect time to switch gears and tap into this booming industry. Let the Ultimate Front End Development Bundle get you ready for this new career from the comfort of your couch. Tune into the eight courses whenever you want, allowing you to work at your own pace.

The 48 hours of online instruction will school you in HTML, CSS and JavaScript. And there's no need for prior experience, as it's geared towards all levels of learning — including beginners – with courses like The Complete HTML & CSS Course: From Novice to Professional and The Complete jQuery Course: From Beginner To Advanced.

Get access to these courses and be on your way to a new career for just $39 today.

Want your products featured in The Creative Bloq Shop? Learn more about how to sell your products online!
Share:

The 10 best HTML5 template designs

The web abounds with HTML5 templates, and like most things on the internet, they're of varying quality. With so many free options available, you might be wondering why you would pay for an HTML5 template. The reasons to pay for a template can range from showing support for the developer who created the template, to buying ongoing customer support either from the developers or the template warehouse.

In addition, paid templates often have more customizable options than their free counterparts, as well as advanced features such as parallax scrolling and video backgrounds. That said, though, if you know what you're doing and fancy saving a bit of time when building a site, a well-made free template can be just the thing to get you started.

In the end, you'll need to decide what works best for you, your site and your budget. Whatever kind of HTML5 template you're after, you should find what you're looking for here.

01. Rogan

Price: $17

Suitable for every sort of business from freelancers up to full-size corporations, Rogan is a powerful and easy-to-use multipurpose template built with Bootstrap 4. It comes with six ready made homepages and over 60 multi-page templates to play with, all of them designed with speed and great responsive looks in mind.

02. XeOne

Price: $7

If you're picky about your nav, then XeOne is a template well worth checking out; it comes with multiple navigation styles, complete with CSS and jQuery animations, so that you can easily build a nav that fits your or your client's identity. It comes with over 30 pre-built pages to get you started, and everything's well-commented and documented, so you shouldn't have any problems adapting a particular design to suit your needs.

03. Porto

Price: $17

This is a popular, well-supported and highly flexible template that you can use for just about anything. It contains layouts suitable for many different purposes, and you can use it with WordPress, Drupal, Shopify and more.

04. Canvas

Price: $16

Canvas is similar to Porto in that you can use it for just about any purpose, and it's packed with layout options for portfolios, blogs, ecommerce sites and more. It's Bootstrap-based, and there are over 1,000 UI features at your disposal.

05. Agmycoo

Price: $17

Where do they get these crazy names from? Agmycoo is an isometric agency and portfolio site designed for any kind of creative enterprise, and comes with more than 15 homepage designs as well as portfolio and blog pages – all with plenty of customisation options.

06. Skrollex

Price: $17

For building sites that create an instant impact, Skrollex looks like an excellent bet. It's a single-page responsive parallax template that comes in light and dark styles, and is perfect for portfolio sites, whether you're showcasing images or video.

07. Spectr

Price: $85

Created with news, magazine and review sites in mind, Spectr is a responsive template that makes it easy to place your content in the form of information blocks. It comes with seven homepage designs, as well as 10 different post templates and seven blog pages, and also features shop templates.

08. The Future

Price: $72

With over 60 ready-made page templates and more than 400 UI elements and blocks to use, The Future is a template with almost unlimited possibilities. Built on Bootstrap 4, it's fully responsive and parallax, with CSS3 animation and sliders to give users that little bit of extra eye candy. And it's all fully documented for painless building.

09. Paradigm Shift

Price: Free

Don't like paying for your templates? That's cool, there are some fantastic free HTML5 templates out there. We're particularly taken with this offering from HTML5 Up; it's a responsive design that looks great out of the box, but with loads of potential for customisation, and it's completely free under a Creative Commons licence.

10. Industrious

Price: Free

Here's another free option, available under a Creative Commons licence from Templated. It's a business-oriented template that's responsive and comes complete with a sliding menu, and it even features a video banner for that extra bit of visual impact.
Share:

Build an AI-powered chatbot

If you’re interested in learning more about AI, Josh Clark, the founder of Big Medium, will be exploring the critical role for designers in AI products at Generate New York (April 24-25). To book your ticket to this award-winning conference for web designers, visit www.generateconf.com.


Artificial Intelligence (AI) enables us to create new ways of looking at existing problems, from rethinking environmental strategies to how we learn. Your projects – whether apps, web sites or games – can leverage AI to make them more engaging, easier to use and have more valuable results. One such method involves creating a natural-language chatbot to help users interact with your site.

To create your first chatbot, we’ll use Google’s new Dialogflow toolset. It harnesses powerful machine learning as well as speech-to-text. It can be incorporated right into your website as a widget or customised to your needs.

01. Create an account

Go to dialogflow.com and create your account. Sign in and agree to the permissions to enable Dialogflow to have access to your account.

02. Create an agent

Dialogflow uses the term ‘agent’ to represent instances of your AI. Think of the agent as the virtual intelligence you are creating. You could have many agents working for you, each with its own personality and purpose.

Click on the ‘Create Agent’ button and enter a name for your agent: ‘HAL 9000’.

03. Create an intent

First, you need to create an Intent. We are defining the ‘intention’ of the user’s inputs. Click ‘Create Intent’ and name it ‘open doors’. Press ‘Save’.

04. Train the AI for this intent


Train the AI for an intent by providing phrases that a user might use

Train the AI for this intent by providing phrases that a user might use. The NLP AI will use these and derived variations to train the agent. Add the following training phrases in the ‘Training phrases’ window and add as many of your own as you like:
  • ‘Open the Pod bay doors, Hal.’
  • ‘Open the doors.’
  • ‘Let me in, Hal!’

05. Add responses

Next, you need to add some responses that the agent will respond with. You enter these in the ‘Responses’ window. Try out some like this:
  • ‘I’m afraid I can’t do that, Dave.’
  • ‘I can’t do that right now.’
Then press ‘Add Responses’ and ‘Save’ up at the top again. You’ll see notifications that the agent is being trained and then it is ready.

06. Test out the chatbot

On the right-hand side of the screen is a testing tool. The chatbot will use Google’s speech-to-text service to translate your voice into text if you try that out. You should see the results of your request and the response the AI agent selected. Very cool!

07. Create and use an entity

Entities are concepts that can be defined and reused in the agent’s responses as variables. Let’s train the AI to understand when a user is expressing an emotion then use that in its response to the user.

On the left-hand menu, click ‘Entities’. Type ‘emotion’ for the name of your new entity. Keep ‘Define synonyms’ checked. Click in the table below and type ‘angry’ as the first emotion. Then click to the right of that and add synonyms such as ‘mad’, ‘upset’, and so on. Then add another entry for ‘scared’ and use synonyms ‘afraid,’ ‘terrified’, etc., that you like. Press ‘Save’ when done.

This has now trained the Agent to understand that ‘angry’ and ‘scared’ are emotions a user may communicate. All those synonyms are variations that might occur. The AI will generate some as well.

08. Create a new intent

Now we are going to create a new intent to use the ‘emotion’ entity we have created. Call this intent ‘emotions’ and click ‘Save’.

Next add new training phrases such as ‘you’re scaring me’, ‘you’re making me mad’, and ‘I’m very angry,’ using variations of angry and scared keywords. This will train the agent to understand the various ways that a user may phrase this emotional statement.

You’ll notice the system highlights the scared and angry words for you. It’s already flagging these as entities. It has also added an entry into the ‘Actions and parameters’ window. This enables you to use these entities in your responses, too. 

09. Add a response using the new ‘emotion’ entity

In the Responses window, add new responses that use this new entity. Note the ‘$’ to denote the ‘$emotion’ Entity. Try adding these responses:
  • ‘I am sorry you are feeling $emotion, Dave.’
  • ‘Feeling $emotion is a human response, Dave.’
Click ‘Add Responses’ and press the ‘Save’ button at the top of the screen to save the entire Intent.

10. Test your chatbot again

Try saying or typing the following phrases in the testing tool.
  • ‘You’re making me very angry Hal.’
  • ‘You’re freaking me out.‘
Notice how it responded using ‘scared’ with the second one? It used our synonym, ‘freaked out’ to know that we meant scared. Very cool.

Feel free to play around with this as well as add some more intents and responses that you like and then we’ll add this to a web page.
Share:

Popular Post

Web Design

5 Quick-fire portfolio tips from design experts

Your design portfolio is one of your most useful tools. It can win you commissions, help you snag a new design job, attract collaborators, a...

Labels

Most view post