Connect with us

Design & Coding

HTML Forms II

Published

on

Last week I explained the markup required for setting up the main aspects of a form. This week I’m going to explain the form input tag and its various uses.

The input tag

The input tag offers us several types of field depending on the value of the type attribute used. The different types available are text, password, checkbox, radio, file, hidden, submit, reset, button, image.

The type attribute defines the type of input field we’re using, and depending on what’s used can then define how the other attributes are used. So the different types are:

text

The text type is the most common input type used. This gives us a text field to allow the user to type in plain text. When using a text input you have the following attributes available to you

id
This should match the value of the label’s for attribute, as explained last week, and also the value of the name attribute (see below)
name
This is a required for serverside scripting and should match the value of the id attribute.
size
This allows you to define the length of the field displayed on the screen. It’s optional.
maxlength
This allows you to restrict the maximum number of characters allowed in the text box. This is optional.
value
If this contains a value it will be displayed in the text field. This is optional
disabled
The disabled attribute (which should have a value of disabled), will prevent the user from being able to edit the content of the field.

Example usage of this would be

[sourcecode language=”html”]
[/sourcecode]

password

The password type is identical to the text type except by using a type value of password it masks the characters typed into the box from anyone else.

checkbox

A checkbox is a tickbox (basically!). You can have a single checkbox or a group of checkboxes. The attributes available on this are

id
This should match the label’s for attribute value.
name
This can either match the ID or if it’s for a group of checkboxes it can use a different value. For accessing the checkboxes via PHP or ASP you need to use the same name in the group and put square brackets at the end of it eg. name=”chkboxes[]”.
value
This is a required attribute otherwise your checkbox, despite being checked, will be empty.
checked
If you want to set your checkbox to be ticked by default then it must use the checked attribute and have a value of checked.

An example of usage is

[sourcecode language=”html”][/sourcecode]

(Technically you don’t need the for attribute in the label tag when you wrap the tag inside the label tags, however for code completion I still use it).

radio

‘Radio buttons’ are similar to checkboxes (they’re the circle ones), however you usually have a group of radio buttons and they all share the same name attribute. The difference then is that you can only select one radio button in a group. Otherwise the attributes available are the same as for the checkbox above.

An example of using radio buttons could be to ask someone their favourite colour eg.

[sourcecode language=”html”]

[/sourcecode]

And to see this in action:



file

The file type allows you to put a file browse box on the form to let someone browse for a file on their computer. If you want to use this then you need to also add the attribute enctype=”multipart/form-data” to the form tag as well, or else the file will not be uploaded.

When using the file type the following attributes are available:

id
This should match the value of the label’s for attribute, as explained last week, and also the value of the name attribute (see below)
name
This should match the value of the id attribute.
size
This allows you to define the length of the field displayed on the screen. It’s optional.

This field is quite similar to the text field with the attributes and the usage is similar, except the outcome with add a browse button after the field eg.

hidden

Hidden input types allow you to add additional data into a form without it being displayed on the screen. This is quite similar to the text input except that you must have the value attribute, and do not need the size, maxlength or disabled attributes, eg.

[sourcecode language=”html”][/sourcecode]

submit

The submit type will create a submit button on the screen to allow your user to submit the form by clicking the button. The attributes available are

id
This should match the value of the label’s for attribute, as explained last week, and also the value of the name attribute (see below)
name
This should match the value of the id attribute.
size
This allows you to define the width of the button displayed on the screen. It’s optional.
value
This should contain the text for the button.
disabled
The disabled attribute (which should have a value of disabled), will disable the button and the user will not be able to click it.

An example of usage for this is

[sourcecode language=”html”][/sourcecode]

reset

The reset button is identical to the submit button above, except you use a type value of ‘reset’. On clicking a reset button, the form will be reset to the default values.

button

This defines a clickable button, similar to the reset and submit buttons. It’s usually used to activate JavaScript applications. It uses the same attributes as the submit button except the type value is ‘button’.

image

Instead of a standard submit button you can use a graphical image to act as the submit button instead by setting a type value of ‘image’. The attributes used with this type are:

id
This should match the value of the name attribute.
name
This should match the value of the id attribute.
src
Required. This points to the source of the image, similar to the img tag.
alt
Required. This contains the alternative text incase the image is not displayed, and for accessibility purposes.

Conclusion

The input tag is quite complex but very useful! Next week I’ll explain the other form inputs, select and textarea, and give some examples of form usage in full.

  •  
  •  
  •  
  •  
  •  

A PHP Developer using WordPress to power both blogging and commercial CMS sites. I've written and released a couple of plugins for WordPress and am currently writing plugins for use on commercial websites.

Continue Reading

Design & Coding

Fotor Photo Editor – The Perfect Graphic Design Tool for Bloggers

Published

on

As bloggers and content creators, it’s important to always have visual content built within our best articles and site designs. Infographics, clip art, stock photos and more… but customized and original images will always grab the most attention.

When it comes to actually creating such visuals, you will have many different options to choose from. Whether you are looking for a free application, one that is browser-based, or even if it’s a premium software you need to download and pay for — it’s important to know what’s out there.

Today we are going to be looking at Fotor photo editor which is a free and powerful tool that lets anyone get started with their own graphic design in just a few short minutes.

This tool allows anyone to start using it through a web browser or even with their mobile application. Whether you need to edit a photo, make a collage, or create a custom and original design, it can all be done through the power of Fotor.

The most popular features of this tool are it’s one click filters and fixes that allowed anyone to make their images pop and stand out like never before.

Let’s take a look at some of the many benefits to using Fotor photo editor for your website, blog, or just everyday life.

With most people looking to customize their mobile screenshots on photos with a few simple click of a button, and this is exactly what fotor photo editor will allow you to do. It will also allow you to create custom YouTube banners that can be used to liven up your channel as well.

You can see a few of these examples in the screenshot below.

When comparing Fotor to other graphic design applications like Photoshop, you are going to find many similarities, but it’s also important to note that premium applications like Photoshop are much more advanced, but also more costly in the process. The software is free to use, you can upgrade to Fotor Pro and find even more upgrade and options available.

What makes this design application and tool great for site owners and bloggers, is that it has a unique set of design tools and features — which are what most content creators are looking. In short, it provides users with what they need, while not overwhelming them in the process.

Fotor also offers a nice selection of design templates to choose from, which makes the process of creating new and original content even easier. These template designs scale across the many different design themes, sizes, and concepts on the site.

In addition to everything else mentioned, there is also a nice collection of resources, guides, and tutorials that can be found on their site blog. Such resources will provide users what the information and walk-through processes to get the most out of Fotor.

If you are currently looking for a new design editor to improve the look and feel of visual content on your site, be sure to give Fotor a try.

  • 1
  •  
  •  
  •  
  • 1
Continue Reading

Design & Coding

4 Essential Elements of Web Design (No.3 Will Shock You!)

mm

Published

on

If you’re a small business owner take note of these four elements of web design. They’re essential for boosting your online presence. Click here for more info!

Have you ever wondered why most business websites tend to look the same? It’s like you’ve seen one and you’ve seen them all.

The truth is a lot of business owners prefer the easy route. That means going for a website builder, which offers templated designs.

If you want something different, you’ll have to go custom. But that takes a lot of time. Plus, you’ll have to look for a skilled designer/developer.

Whatever route you choose, you need to understand the elements of web design. After all, it’s your website. If you choose to hire a pro, you need to know what to ask for.

And if you opt to DIY it, then you can steer clear of cringe-worthy web design. That said, here are 4 web design elements that will help boost your online presence.

1. User Journey

You can scroll through countless website design guides and you’ll never see one that says, “ignore what users think.”

Consider mobile apps. Would you download something that’s hard to use and has a lot of annoying ads?

When you design your website, put yourself in your visitors’ shoes. Is your website hard to navigate? Does it load fast?

But how do you know if your user interface is good? Aside from consistency, it has to be simple, intuitive, responsive, and flexible.

This is why it’s good to test different designs first before committing to one. It saves time and eliminates the need for major changes later on.

2. Content

Designing for the web doesn’t stop when you have a “pretty” website. Sure, your target customers will appreciate nifty graphics and all. But if your content doesn’t offer value, users will leave your website.

Now, this doesn’t mean huge blocks of text that will drown your visitors with information. Opt for conciseness. Give your target audience content that’s easy to digest so they can process it better.

Depending on what CMS you are using, content creation is usually the easy part. This is especially the case when using platforms like Weebly, WordPress or Wix. Since most of these platforms are drag and drop, it’s simply a matter of getting familiar with each platform, and knowing how to create great content. There are no programming or design skills required.

3. Accessibility

Did you just check the title again? If yes, you may be wondering why this would be shocking. Shouldn’t this be part of any website designing guide?

The thing is there are plenty of websites that use low contrast for text because it’s trendy. But you have to take into account users who have vision problems.

There has to be enough contrast between text and background. And you also need to choose your colors well. You don’t want to alienate color-blind and blind users who use assistive technologies.

4. SEO

Some people approach website design as a separate entity from search engine optimization. But there’s a way to be strategic about the process so that design elements improve the SEO of your site.

The easiest way would be to outsource to an all-in-one design company such as https://www.databerry.com/. When they build your site, they also take care of the backend coding stuff. This ensures your title tags, meta tags, etc work for better search ranking.

Want to Know More About the Elements of Web Design?

Knowing the elements of web design is your first step to a website that looks and functions well. But getting them all right takes a bit of trial and error.

For more web design tips, don’t forget to check out our other blog posts.

  •  
  •  
  •  
  •  
  •  
Continue Reading

Design & Coding

Defining the Best Colors, Style and Design for Your Brand Logo

Published

on

Have you ever thought about why some companies and brands are more successful and well-known than others? In many cases, it comes down to the products or services they offer, but the actual look and feel of the company brand can play a huge part in this as well.

A great example of this would be every brand that currently has a well-known logo design or identity, even though it doesn’t have the actual name of the company within the logo. Names like Nike, Target, Apple, Microsoft, and Starbucks come to mind. Billions of people from around the world can recognize these brands simply by seeing their logo… and they don’t even need to see a name associated with it. You can see some of the most popular brand logo designs and changes they’ve made over the years in this famous logos reference guide.

With all of that in mind, it’s important to create a logo design for your business that not only represents what you do but also one that resonates with your audience as well. To give another example of the many different ways an industry can influence the way logo are created to relate and brand with an audience, let’s take a look at some of the top online survey sites from a site like SurveyClarity.

What do you notice about each of the popular survey logo designs below? Not only are they mostly text-based, they are all different variations of GREEN! WebPageFX.com says the following about the color green in logo design:

Green is Youthful and Earth-Friendly: Health – Tranquility – Freshness. Green represents growth, and evokes a feeling of relaxation and healing. It is the color of healthy vegetation, so it reminds viewers of nature and health. It is also associated with money and wealth.

This is something you will see in many different markets. Another great example is the banking or make money space. Many of the banks will have a green or blue feeling to them — which both represent calm, financial, and fresh feelings and emotions. However, many other brands like Twitter and Dell are using BLUE to represent their compani\y logo and brand as well.

Now that you likely have a better understanding of what different colors are being used in logo designs today, you might be thinking about the different styles, variations, and colors you can use within your own company or site design and branding.

Thanks to the “What Type of Logo is Right for You?” infographic below (provided by Designhill), we are going to break down the many components and choices of logo design, and how to best represent your brand.

To get started with the process, you should first decide on if you want a font-based logo or a graphic design. No matter which option you choose, you can tweak both design types to work with whatever style you’d like to go with.

A “Word Mark” logo design is one that is made up of a stylized type font, yet is also original in design. A few good examples of this would be the HBO, NASA and CNN logo. At their core, they are text fonts — but also with a unique and custom design in the process.

After you’ve given some thought to the different colors, design types, and styles of logos you can create, we recommend you take a look at the new AI-powered logo maker from Designhill. Not only is the tool free to use, it can create an unlimited number of logo designs for you to choose from. Keep scrolling through the designs until you find one that you like, then complete the process by purchasing the fulicensednced version of your logo design, which also comes in a wide range of file types.

How to Find the Right Logo Design for Your Band

As shown in the infographic below, we can answer a few simple questions to see what type of logo you might want to focus your efforts on for your brand. Depending on how you answer each of these questions, you will find a different result for your brand identity.

  • Is your business well established?
  • Is your business internationally known?
  • Do you plan to remain a small business?
  • Does your company have a long name?
  • Do your company contain a unique word?
Of the many different types of logos you can choose from, the most popular are emblems. However, you will also see a popular occurrence of word marks, pictorial marks, abstract marks and letter marks.
  • 1.3K
  •  
  •  
  •  
  •  
Continue Reading

Trending