The HTML5 era has dawned, and with it comes a host of new opportunities for web developers – including you.
The HTML5 spec is a culmination of a decade of work by the W3C working group. The previous HTML4 spec was finalized in 2004, and the W3C began accepting contributions in November 2010.
The goal of HTML5 is to create a standard that will eventually replace HTML4 – bringing with it a new wave of innovation and improvement for the Web as we know it.
One of the main improvements in HTML5 is the switch from a table-based layout to one that uses a flexbox for defining column widths and a fluid, responsive layout. What’s more you don’t need to use JavaScript to enable HTML5 features, so all you need is a modern browser.
These changes mean that websites can be crafted without using an image editor – saving you both time and resources.
What is HTML for Web Design?
HTML stands for HyperText Markup Language. It is a set of codes that can be used to format and tag web pages.
When used in conjunction with CSS, it is a comprehensive way of laying out a website.
In this article, we’ll cover everything you need to know about HTML for web design including the differences between web pages, templates, and widgets.
Difference Between Web Pages, Templates, and Widget
A web page is a specific kind of HTML document that usually contains information such as a logo, website slogan, and frequently asked questions. Web pages can be used to present information to users as they browse the web. They might contain images, video, or audio elements.
To create a web page, you generally need a text editor such as Notepad or Sublime Text. If you’re using WordPress, you can use their built-in HTML editor.
A web template is a predesigned web page that can be used time and time again. The best way to create a web template is to use a template-builder tool, which we’ll discuss later. If you’re using WordPress, you can use their built-in WP HTML editor to create a web template.
A widget is a small piece of interactive code that can be added to a web page or blog post to enhance its functionality. They mostly appear as an afterthought at the bottom of a page or post, though they can be used to create complex interfaces if integrated properly.
A good example of a widget is the Google Maps integration that appears at the bottom of this blog post.
Why Use HTML For Web Design?
HTML is an easy language to learn if you’re coming from no programming background.
It’s easy to use and allows for extensive customization. If you’re looking for an all-purpose programming language, then HTML is a great option. It is also a commonly used language on the web, which means that you’ll have ample opportunity to learn and use it.
HTML can be used to design almost any kind of website including blogs, online stores, and magazines. It is also used to create websites that are used for informational purposes such as online encyclopedias and wikis.
Finally, HTML can be used to create websites that allow for user interaction, which is great if you’re running an online store or blog.
What is more is that all the common web browsers, including Chrome, Mozilla Firefox, and Safari, support HTML. This means that your content will display the same way to your users whether they are on a desktop computer, laptop, or mobile device.
Browsers will even apply any available font-smoothing options, which means you don’t need to worry about your text looking blurry due to poorly designed fonts.
Creating A Blog
Blogs are great for informing and entertaining your readers with your thoughts and news articles. They are generally short posts, ranging from a few hundred words to a few thousand. Short posts allow for more frequent updates, which means more content for your readers.
Blogs can be run through most content management systems including WordPress, which makes them easy to create and maintain. Once you’ve got your WordPress blog set up, you can use their built-in BLOG function to start publishing your content.
From here, you can select the category that you want to use for your blog (e.g., technology, business, science, etc.) and then select the most appropriate post template by clicking the “Choose a template” button.
The default post template for WordPress is the “Fully formatted text” template, which can be used for almost any purpose. If you’re looking to create a more sophisticated blog that includes an About me and A-to-Z guide for your readers, then you can choose the “Detail-oriented layout” template.
As for the content of your blog posts, you really don’t need to worry about making sure that all your posts are perfect. As long as you’re producing content that is entertaining or informative, your readers will not complain.
Building An Online Store
Online eCommerce stores are great for selling a diverse array of products, from clothing to electronics to books.
They allow for easy product acquisition and provide customers with an opportunity to research the product they want to buy before making a purchase. It can be built with many different platforms including WordPress and Shopify. In this case, you’ll want to use a WordPress store for the shopping cart and checkout process.
WordPress stores come with a pre-designed shopping cart interface that is easy to follow. As before, you can choose the template that you want to use from their store builder by clicking the “Choose this theme” button at the top of the screen.
When setting up your WordPress store, you’ll need to decide on a name for it, create a logo and basic colors, and enter your website’s URL. You can then start adding products to the store.
WordPress stores accept all the usual payment methods including PayPal, Stripe, and credit cards. For those who don’t have a PayPal account, they can use their credit card information to make a purchase.
Creating A Magazine
Magazines are great for informative reading, whether you’re an enthusiast or a professional. They can be used to present articles on a wide range of topics including science, technology, art, travel, etc. Since they are a little longer than blogs, magazines can contain more in-depth articles.
The first step to creating a magazine is to think about the type of content that you want to include. Are you looking to create a hobby magazine to document your travels and adventures? Or would you rather create a medical magazine that focuses on the latest diagnostic procedures and treatments?
Once you’ve got your idea fleshed out, you can use their built-in magazine template to start building your magazine. Just follow the prompts to create your new magazine and make it look as good as possible. You’ll then need to publish it on a WordPress-based hosting service.
Most magazines are published once or twice a month, though you can create a quarterly magazine with minimal effort. As with a blog, once you’ve got your magazine set up, you can use its built-in SEARCH function to find articles and content that matches the topic you’re working on.
Using HTML For Web Design
Now that you’re equipped with the knowledge needed to create basic blogs, online stores, and magazines using WordPress, you can move on to integrating these platforms into one.
The following sections discuss ways in which CSS can be used to make all three of these functionalities work together.
The Template Engine
If you’ve ever created a website using WordPress, then you’ll know how important it is to have a template engine that can interpret the contents of your posts and turns them into a functional web page.
WordPress comes with its own template engine, which is the basis for creating any kind of web design with WordPress. These template engines are called “Themes” and each one of them can be used to create a unique look and feel for your site.
A template engine serves as the “brain” of your web design, meaning that it takes the instructions you give it and then works in the background to make them come to life.
Flexbox: The Future of Website Layout
Flexbox is already supported in all major browsers – including Internet Explorer 11 – so it’s time to upgrade your website’s layout engine.
Flexbox offers a number of advantages over previously traditional techniques for laying out websites. The main one is that it’s an open standard, so any device or browser can implement it.
Let’s take a closer look:
Flexible, Fluid Widths
With a fluid width layout, the layout engine attempts to fit as many columns as possible while still maintaining fluidity – in other words, the columns should adjust to fit the width of the browser while retaining their defined relationship to each other.
This technique makes the layout more flexible and easier to update. If your website undergoes major changes (such as adding a new page or section), you can simply change the HTML and the layout will update itself.
Flexbox is also fully responsive, so it works well on any device including mobile. If you have a fluid-width layout, the columns will adjust their size and shape to fit the width of the device – no matter what size it is.
Another great thing about using fluid widths is that you can define the relationship between columns very easily. For example, if you want the columns to be evenly spaced, simply define them with a column width of 20% and set the column order to be 0% – 60% then 40% – 60%.
Clean, Well-Arranged Code
With a regular table-based layout, every row in the table represents an HTML element – such as a paragraph or image – and the table’s structure and design are tightly coupled. This can lead to messy and unorganized code that is difficult to maintain and scale.
Flexbox is based on a different concept. While tables are used to define the layout of a page, the markup itself is kept separate from the styling, so it’s easier to add new elements without having to worry about overwriting previous work.
This also means that the HTML5 spec is a lot cleaner and easier to follow. There’s less chance of ending up with code that is hard to read and troubleshoot once everything is put together.
One of the other great things about using Flexbox instead of tables is that you can create a vertical navigation bar on the left side of the website. This can be done with a simple CSS property called flex-direction, which can be set to either row or column to create a flat or 3D appearance, respectively.
Images and Media Sparse
When designing a website, you usually end up with large amounts of images and media assets. For example, if you’re creating a corporate or eCommerce website, you’ll most likely need to include at least some product images – and those images can grow quite large. Using tables for the layout means your document will end up dominated by images.
With a fluid-width layout, you can easily make the columns adjust to accommodate the amount of content on a page.
So if there’s a lot of text – either from a long article or a long list of products – the column widths will expand to fit it. This makes using fluid widths a great option for websites with large amounts of text.
In addition to saving you time and effort, this approach makes your website look more modern and up-to-date. Users often complain about bloated websites, so implementing a fluid-width layout can give your site a boost in terms of user experience. Plus, it’s always a good idea to keep the markup simple and easy to follow – clean, well-organized HTML helps make your site easier to read and maintain.
Last but not least, images and media are often a crucial part of any website. Using tables for the layout means you’ll need to keep track of all the image paths and media queries yourself. With a fluid-width layout, you can simply include the image or media path as a URL and the browser will fetch it automatically.
No More Padding or Margins
Paddings and margins around elements on a page can be a pain. Not only do they take up space and make the elements not fit the page’s design, but they’re also there when you don’t need them and can add additional spacing and make the elements stick out more.
With a fluid-width layout, you no longer need to worry about paddings or margins around elements. The browser will ensure the element sits flush and is the same size as the other elements on the page.
Some designers may choose to add some spacing around an element to improve the appearance. However, this can often be avoided if you use a fluid-width layout and choose the proper amount of padding.
Adding too much padding can increase the spacing between columns, making them appear smaller than they are.
This is why it’s important to define the relationship between columns – if you know the columns should be of equal width, but want to keep some space around one or more elements, simply add a padding of 10-20% of the element’s width.
Overall
If you’re trying to design a website that looks great on any device including mobile, using a fluid-width layout is a great option.
Not only will it save you a lot of time and effort, but it will improve the appearance of your site.
Having a vertical navigation bar on the left will also make users feel more at home and will increase the likelihood of them staying on your website – or coming back after navigating away.
These are just some of the advantages of using fluid widths for the layout of your website. As you can see, it’s a good choice for any developer or designer who values time and effort saved and quality improvements made to their site.