Bluehost vs HostGator: Choose the right Hosting for your WordPress (2018)

bluehost vs. hostgator best webhoster webhosting 2018




Bluehost or HostGator? Which one is the best web host and why? Bluehost vs HostGator; two of the most well known companies in the web hosting industry. Here is a head-to-head comparison where we look at 5 of the most important features when it comes to choosing a web hosting company. Choosing between these two providers, however, is no easy task as they both offer great features and fantastic value for money. Continue reading to learn the ins and outs of HostGator and Bluehost and find out which web host is the best, and why.



 
  1. Ease of Use for Beginners

Here in this section we look at Bluehost vs HostGator ease of use, beginner friendly and easy to get started with in regards to money back guarantee, domain name registration, website transfer/migration, installing WordPress and website building tools.


  • Moneyback guarantee

Bluehost‘s money-back guarantee is 30 days. You should be aware of the fact that this guarantee does not apply to add-on products, such as domain names. If you cancel within 30 days you receive a full refund. If you cancel after 30 days you receive a prorated refund for the remainder of your hosting term.

  • Domain name registration

Bluehost gives you a free domain name when you sign up for hosting with them. The domain is registered for a year and the domain will be renewed when you renew your web hosting plan.

  • Website transfer or migration

There are two options to move your site. You can either do it yourself for free by manually transferring your files over to Bluehost. Alternatively, you can use the Website Transfer service to migrate up to five sites and 20 email accounts from your former hosting company. This service costs $149.99. Don’t forget; you’ll need to add the FTP option to your hosting package before you can migrate an existing site.

  • Installing WordPress

Installing WordPress can seem like a daunting task. Bluehost has worked hard to make the process easier by using the MOJO Marketplace for all of its installations. Now you can install WordPress straight from your cPanel dashboard.

With Bluehost, you decide how to build your site. You can choose to utilize the on-site builder that is powered by Weebly. You can install WordPress. There are other options available in the Mojo Marketplace, as well.

 

  • Moneyback guarantee

HostGator offers a 45-day money-back guarantee on hosting plans with them, and as with Bluehost it only applies to hosting (not domain names etc). If you are not completely satisfied with their services within the first 45 days of your service, you will be given a full refund of the contract amount.

  • Domain name registration

HostGator does not include a free domain name name, however domain transfer is always free with HostGator. A new domain registration currently starts at around $12.99 for a “.com” domain.

  • Website transfer or migration

HostGator states their commitment to making transferring your site over to HostGator as easy as possible. HostGator will migrate all website files including databases, scripts, and one domain registration transfer for free with each new hosting account within 30 days of sign-up, as well as to newly upgraded account.

  • Installing WordPress

HostGator offers the MOJO Marketplace quick install for existing WordPress sites. Also, they offer tutorials on their site for easy “how to” install WordPress manually. There is a separate “how to” offered for installing a WordPress Optimized site.

  • Website Builder tool

HostGator has a free proprietary site builder for easy creation of a basic site. It features an intuitive interface with drag and drop WYSIWYG functionality that includes the following:

  • 100 or more mobile optimized templates
  • Pre-built site sections
  • Six pages included in the free basic plan

There are upgrades to this service available for a fee.

Visit HostGator.com
 
  1. WordPress

WordPress powers more than 25% of all websites on the web. Meaning if you want to build a site or blog, you want to use WordPress. Any web host that you thinking of using should offer value for money, hassle-free and secure hosting options when it comes to WordPress, plus the host should make it easy to install and get started with WordPress.

 



 


Bluehost offers beginner friendly WordPress hosting starting from $2.95/mo, as well as VPS powered and fully managed WordPress plans starting from $19.99/mo.

  • Officially recommended by WordPress

Bluehost is recommended by WordPress.org, and has worked closely with WordPress since 2005.

  • Installing WordPress

You can easily and instantly install WordPress with a click-of-a-button and manage all your installations from an enhanced cPanel control panel, so you can start building your website immediately.

  • WordPress security

Comes with a free SSL certificate, a WordPress custom designed control panel and CloudFlare CDN is built directly into your account for free without any coding. Premium managed WP hosting comes with pre-installation of ManageWP, advanced security features such as daily scans for malware and vulnerabilities. SiteLock Security, Advanced CDN & SiteLock WAF. Dedicated backup storage and automated backups.

  • WordPress speed

Bluehost‘s managed WordPress hosting is built on a VPS platform with custom architecture engineered to deliver unprecedented performance:

  • VPS powered platform
  • Advanced NGINX architecture
  • Custom PHP-FPM configuration

Visit Bluehost.com

 

HostGator

HostGator offers WordPress Cloud Hosting, that comes with 2.5x speed, advanced security, and free site migrations – starting at just $5.95/mo.

  • Officially recommended by WordPress

HostGator is not recommended by WordPress.org

  • Installing WordPress

If you already have a WordPress powered site, a free migration service will transfer your existing WordPress site to HostGator. You can easily and instantly install WordPress with one click and manage your site from an enhanced cPanel control panel.

  • WordPress security

No free SSL certificate but global CDN, automatic malware removal using SiteLock security is included for free with HostGator’s managed WordPress hosting plans, which gives you HackAlert monitoring service that checks your website daily and immediately notifies you if your website has been hacked or injected with malicious code. CodeGuard automatic website backup is also included. Get daily automated website backup for all web files and databases with a 1-click restore.

  • WordPress speed

HostGator promises that pages load at blazing speed worldwide without having to configure your caching and CDN. Experience up to 2.5X faster load times due to super charged cloud architecture, low-density servers, CDN, and multiple caching layers. Your website content is managed more efficiently, enabling dynamic content requests to be processed lightning-fast

Visit HostGator.com
 
  1. Speed & Uptime

Speed and uptime are the cornerstones of any web host’s core features. Because having a fast loading website that is up online at all times are two of the most important things you want from a good web host.

 



  • SSD Drives

Bluehost shared hosting plans do not come with solid state drives (SSD), but their server infrastructure is powered by enterprise level SSD database storage.

  • Data Centers

Bluehost doesn’t disclose the locations of their data centers. However, 3rd party research indicates that the company currently has 23 data centers. These are located throughout the US, China, India, and Europe.

  • Infrastructure and Technology

All servers operate at Tier 3 (Tier 4 is the highest) certification. This means that you can expect superior uptime and redundancy capabilities. Uptime is projected to be around 99.982% with an average downtime of 1.6 hours per year. The infrastructure boasts:

  • Quad-processor servers
  • Uninterruptible Power Supply
  • Diesel Backup Generator
  • Mirrored storage backup
  • Content Delivery Network (CDN)

Bluehost offers the content delivery network powered by CloudFlare. This means your site’s traffic is routed through a global network that is optimized for fastest content delivery.

Visit Bluehost.com

 

HostGator 

  • SSD Drives

As with Bluehost, HostGator shared hosting plans do not come with solid state drives (SSD). However HostGator’s Cloud and WordPress hosting plans all come with SSD included.



  • Data Centers

HostGator utilizes several Tier 4 data centers located in Texas and Utah. Their strategic utilization of these facilities allows them to provide the flexibility you need and the performance, quality, and reliability your business requires. Each facility boasts a state-of-the-art server, HVAC, electrical, and backup generators. Their data centers are highly secured facilities that have controlled access.

  • Infrastructure and Technology

Fully backed by their SLA, HostGator promises at least 99.9% uptime. This is part of their service guarantee. They use cutting edge Linux container technology and proprietary technologies, as well that have built-in redundancy for greater security.

  • Content Delivery Network (CDN)

Like Bluehost, HostGator also utilizes CloudFlare for its content delivery and firewall network solutions.

Visit HostGator.com
 
  1. Security

You need to take security seriously and use a web host that has the tools and preventative measures in place the protect your website from being spammed, hacked, injected with malware or taken completely.

 

 

 


  • Website Backups

Bluehost offers complimentary adhoc automatically generated backups for their customers. You can schedule these to take place on a daily, weekly, or monthly basis. Bluehost doesn’t guarantee the backups and recommends that all customers create their own backup (can be done via Cpanel).

  • SSL Certificates

Bluehost provides a free shared SSL that is available to accounts which reside on a shared IP. For Standard and Pro accounts, there is only one Dedicated IP and so only one SSL Certificate. For VPS, dedicated, managed, or reseller accounts, you can purchase multiple Dedicated IP and SSL Certificates since there will be multiple cPanels created within the account.

  • Malware Scans

Malware scanning only comes as a paid upgrade. Bluehost’s SiteLock addon includes:

  • Basic Spam Monitoring: Checks daily to make sure your site is free of spam
  • Basic Business Verification: Establishes trust in your business site
  • Site Verification Certificate: Develops customer trust
  • Blacklist Monitoring: Avoids quarantining by Google
  • Basic Malware Monitoring: Daily scans for malware

For $249.99 per year, Bluehost offers Site Doctor. Site Doctor can quickly diagnose and stop any issues that arise from malware.

  • DDOS protection

DDos protections is built into Bluehost’s infrastructure. But according to the site, DDoS attacks are not something they can warn customers about beforehand. They do say that when these attacks occur to understand that their team will do all things possible to restore your service quickly.

Visit Bluehost.com

 

HostGator

  • Website Backups

HostGator doesn’t give the option of creating automatically generated backups. You can make an instant manual backup and you can then use this backup file to restore your account on our servers if need be. There is a paid upgrade called CodeGuard, it creates daily automated website backups for all your web files and databases with a 1-click restore.

  • SSL Certificates

No free SSL certificate is being offered. The following types of SSL certificates are available through HostGator. Only the Domain Validated SSL will be issued for free.

  • Domain Validated
  • Company Validated
  • Extended Validation
  • Wildcard
  • Multi-Domain

You should know that the “Hatchling” hosting package is not able to utilize SSL certificates.

  • Malware Scans

Like Bluehost, HostGator has also partnered with SiteLock to provide powerful and reliable malware scans. The HackAlert monitoring service is particularly useful as it checks your website daily and immediately notifies you if your website has been hacked or injected with malicious code.

  • DDOS protection

HostGator protects from DDoS attacks. The site states that they have implemented an extensive custom firewall rulesets that protect servers from the many forms of attack. As well, their data center has enabled network-level flood protection.

Visit HostGator.com
 
  1. Customer Service & Support

You want to be able to get the help you need when you need it (because there will come a time when you need support from your hosting company). It is essential to have a hosting company with high quality, responsive, friendly and knowledgeable customer and technical support.

 

 

 


  • Ways to Get in Touch

Bluehost offers several ways to contact them for a variety of reasons. There are dedicated toll-free numbers to call for sales, web hosting, tech support, and WordPress support. As well, there is a method to submit support tickets and chat.

  • Response Times
  • Support Tickets – no time given
  • Chat – instant
  • Phone – instant
  • Areas of Expertise

There is 24/7-365 dedicated support personnel available for the following areas:

  • Account Management
  • Sales
  • Tech Support

Visit Bluehost.com

 

HostGator

  • Ways to Get in Touch

From the Support Panel, there are several options for getting the help you need. You can contact support by phone, get help with billing, start a live chat, or see if anyone in the forums can help.

  • Response Times
  • Chat – instant
  • Billing Support – minutes to within one business day
  • Forums – varies
  • Phone – instant
  • Areas of Expertise

HostGator is well-known for having excellent customer support. They have an active community of users that are friendly and helpful in the forums. As well, there are hundreds of helpful videos and tutorials available 24/7.

Visit HostGator.com

 

 

The “winner” is? (Summary)

Choosing between HostGator and Bluehost can sometimes feel like having to choose between a Coke and Pepsi. Different strokes for different folks.

That’s why we created this head-to-head comparison of the two most well known hosting companies to help you choose between Bluehost and HostGator.


Bluehost vs HostGator?

Who is the winner?

It’s a very close call but

Bluehost is the winner.


 


  • HostGator is easier to use and more beginner friendly as they include more features such as free website migration / transfer (Bluehost charges $149.99 to migrate your site). Plus HostGator’s refund policy is more generous than Bluehost. HostGator’s only downside is that they don’t offer a free domain name.
  • When it comes to WordPress hosting Bluehost is better because they are officially recommended by WordPress.org and you get more more features like free SSL certificate with Bluehost.
  • It’s a tie between HostGator and Bluehost when it comes to speed and uptime, as both companies offer similar features when it comes to this aspect of web hosting.
  • Bluehost is the better web host when it comes to security, because Bluehost offers free SSL certificated and they do perform complimentary website backups.
  • It’s another tie between Bluehost and HostGator when it comes to customer service and support, as both companies offer similar features when it comes to this aspect of web hosting.

Please share this article if you like it. Thx.

The Best Web Hosting Services / Webhosting / Webhoster – 2018 2019

best web hosting




If you own a business, your company needs a website? If it doesn’t have one, it ought to. Naturally, online businesses by definition require websites for marketing and selling products or services by definition. In the internet age, however, even local brick-and-mortar business need to at the very least be discoverable via the web (and they probably ought to be selling online, too). Word of mouth only gets you so far in this internet-centric age. These days, people discover new businesses—even local business—via Bing, Google, and Yahoo, search engines that make it incredibly simple to find companies’ products, operational hours, and prices.



If your business doesn’t appear in the search results, especially on the first page, it’ll be difficult for potential clients and customers to find you. In other words, no website, no money. You do not want that. Of course, web hosting isn’t just for businesses. You may want to host a personal website for many reasons. Either way, the services listed here have you covered.

Also read our article about maximizing your traffic

The first step in building your online presence is finding a web host, the company that will store your website’s files on its servers and deliver them to your readers’ and customers’ browsers. Web hosting services offer varying amounts of monthly data transfers, storage, email, and other features. Even how you pay (month-to-month payments vs. annual payments) can be radically different, too, so taking the time to plot exactly what your company needs for online success is essential. Many of these companies also offer reseller hosting services, which let you go into business for yourself, offering hosting to your own customers without requiring you to spin up your own servers.

You should also familiarize yourself with the many web hosting tiers that are available. In your research, you’ll find shared, virtual private server (VPS), dedicated hosting, and WordPress hosting plans. Each tier offers different specs and features that you should take the time to analyze. I’ll break them down.

What Is Shared Web Hosting?

Shared hosting is web hosting in which the provider houses multiple sites on a single server. For example, Site A shares the same server with Site B, Site C, Site D, and Site E. The upside is that the multiple sites share the server cost, so shared web hosting is generally very inexpensive. In fact, you can find an option for less than $10 per month.

The downside is that all the sites share a single server’s resources, so huge traffic spike on Site A may impact the neighboring sites’ performances.

What Is VPS Web Hosting?

VPS hosting is similar to shared hosting in that multiple sites share the same server, but the similarities end there. A dedicated web host houses less sites per server than shared hosting, and each site has its own individual resources.

As a result, Site A’s traffic surge won’t impact Site B or Site C. As you’d expect, VPS hosting costs more than shared hosting. You’ll pay roughly $20 to $60 per month.



What Is Dedicated Web Hosting?

Dedicated hosting, on the other hand, is both powerful and pricey. It’s reserved for sites that require an incredible amount of server resources.

Unlike shared or VPS hosting, dedicated hosting makes your website the lone tenant on a server. The means that your website taps the server’s full power. That said, many dedicated web hosting services task you with handling backend, technical issues.

What Is WordPress Web Hosting?

WordPress hosting is for people who want to build their sites on the back of the popular WordPress content management system (CMS). Many WordPress hosts automatically handle backend stuff, so you don’t have to worry about updating the apps and CMS, and enabling automatic backups.

 

Extra Web Hosting Info

If you’re not sure of the type of hosting your business needs, you might want to start small, with shared Web hosting. You can always graduate to a more robust, feature-rich package of, say, VPS hosting or even dedicated hosting in the future. Unfortunately, some hosts don’t offer all hosting types. Consider how much you expect to grow your website, and how soon, before you commit to anything longer than a one-year plan. It’s worth spending the time up front to make sure that the host you select with is able to provide the growth you envision for your site, as switching web hosting providers midstream is not a trivial undertaking.

Once you decide you price range, you need to consider how long you’ll need web hosting. If it’s a short-term project—say, less than a month or two—you can typically receive a refund should you cancel your hosting within 60 days. Some companies offer 30-day money-back guarantees, others offer 90-day money-back guarantees. Once again, it’s beneficial to do your homework.

The Web Hosting Features You Need

Many web hosts offer limited features in their starter packages and then expand the offerings (sometimes tremendously) for higher-tier plans. Read the small print to make sure the plan you are selecting offers what you need. If you need a site builder application to design your website, make sure that the low-cost web host you are picking actually comes with a site builder. Many of them require you to pay for the builder as a separate add-on. Website builders usually don’t cost a lot of money, but if you can find a web host that includes one for free, that’s money in your pocket. And, if it’s integrated with your hosting service, you’re more likely to have a smooth, supported experience.

You also want a web host with 24/7 customer support—if not by phone, then at least by chat. Forums, knowledge bases, and help tickets are all well and good, but sometimes you just need to communicate with another human to get things ironed out as quickly as possible. That said, not all 24/7 customer support teams are equal. Companies like GoDaddy and Liquid Web boast incredibly knowledgeable and helpful customer support squads—a fact that we confirmed in our in-depth reviews of those web hosting services.

When it comes to server operating systems, Linux is typically the default option. Still, some services offer a choice of Linux or Windows hosting. If you have specific server-side applications that require Windows, such as SQL Server or a custom application written in .NET, then you need to make sure your web host has Windows hosting. But don’t let the idea of a Linux host intimidate you. Nowadays, most web hosts offer a graphical interface or a control panel to simplify server administration and website management. Instead of typing at the command line, you’ll click easily identifiable icons.

Windows hosting is often more expensive than Linux hosting, especially in the dedicated server area. That’s not always the case, but it’s something you should be aware of as you shop around.

Email Hosting

If you aim to have a web presence, you’ve got to have email. It’s a convenient way for potential customers and clients to send you a message, Word document, or other files. Thankfully, most web hosts include email in the price of their hosting plans. Some web hosts offer unlimited email account creation (which is great for future growth), while others offer a finite amount. You, naturally, should want unlimited email.

That said, not all web hosts offer email. WP Engine, for example, does not. In such instances, you must email accounts from a company other than your web host. GoDaddy, for instance, sells email packages starting at $3.49 per user, per month. That might sound like a hassle, and just one more thing to keep track of, but there are actually some webmasters who feel that separating your email hosting and web hosting services is smart. That way, one provider going offline won’t completely bork your business.

Uptime, Uptime, Uptime!

The aforementioned features are valuable to the web hosting experience, but none matches the importance of site uptime. If your site is down, clients or customers will be unable to find you or access your products or services.

Recently, we’ve added uptime monitoring to our review process, and the results show that most web hosts do an excellent job of keeping sites up and running. Web hosts with uptime issues are heavily penalized during the review process and are unable to qualify for top ratings.



Ecommerce and Marketing

One thing we learned in reviewing the services listed here (and many more) is that even though the packages are very similar, they are not identical. Some are more security-focused than others, offering anti-spam and anti-malware tools. Others offer a variety of email marketing tools. While most of the hosts we’ve reviewed have built-in e-commerce, you may want to consider using a more-robust third-party online shopping cart application like Shopify instead.

If you’re ready to select a great web hosting service, check out the chart above to see PCMag’s top picks in the space. When you’re done with that, click the links below to read our in-depth, tested reviews of the biggest and best names in web hosting.

If you’re just getting started in the web hosting game, make sure to check out our primer, How to Build a Website, and How to Register a Domain Name for Your Website.

Featured Web Hosting Reviews:

 

#1 Recommended Webhosting by BLUEHOST

  • Bottom Line: Bluehost is the best and most affordable Web hosting service that’s simple to use and offers an array of useful plans for consumers and small businesses. It’s our top pick for novice webmasters.

     

    • Pros

      Excellent shared and dedicated Web hosting plans. Useful Weebly site-building software. Good customer service.
      Good customer support. Offers basic and advanced hosting packages. Offers Linux- or -Windows-based servers. Easy-to-use website creation tools.No setup fee.
      Lots of security features. Extensive domain-management tools. Good VPS offering. Unlimited data transfers per month. Cloud storage plans. Generous money-back guarantee.

    • Cons

      No Cons here

    • Bottom Line

      The feature-packed BLUEHOST gives you all the tools to craft attractive, functional websites, but the interface requires plenty of digging to find what you need.



 

#2 Recommended Webhosting by 1&1

 

  • 1&1 Web Hosting

    Bottom Line: 1&1 is an affordable web host that offers rich website-creation tools, good support, and Windows servers, but our testing shows that uptime isn’t always rock-solid.

    • Pros

      Rock-solid uptime in testing. Good customer support. Offers basic and advanced hosting packages. Offers Linux- or -Windows-based servers. Easy-to-use website creation tools. No setup fee.

    • Cons

      WebsiteBuilder Plus tier required to add code to site templates. Competitors have longer money-back-guarantee periods.

    • Bottom Line

      1&1 has affordable hosting that comes with a rich variety of website-creation tools, as well as good support and impressive uptime reliability in our testing.

     

    Start your 1&1 Webhosting right here
    1and1.com | Hosting, Domains, Website Services & Servers

     

 

  • HostGator Web Hosting

    Bottom Line: HostGator is a reliable Web hosting service that’s simple to use and offers an array of useful plans for consumers and small businesses. It’s our top pick for novice webmasters.

     

    • Pros

      Excellent shared and dedicated Web hosting plans. Useful Weebly site-building software. Good customer service.

    • Cons

      Lack Windows-based VPS hosting. No one-step WordPress import. Email is missing extra security.

    • Bottom Line

      The feature-packed HostMonster gives you all the tools to craft attractive, functional websites, but the interface requires plenty of digging to find what you need.

Start your Hostgator Webhosting here

 

 

 

HOSTPAPA

Start your Hostpapa Hosting

 

  • DreamHost Web Hosting

    Bottom Line: DreamHost boasts outstanding features that should satisfy most expert users, and a new easy website builder tool makes the web host more welcoming to newbies as well.

    • Pros

      Lots of security features. Extensive domain-management tools. Good VPS offering. Unlimited data transfers per month. Cloud storage plans. Generous money-back guarantee.

    • Cons

      No site builder. Lacks Windows-based servers. May prove intimidating to the uninitiated.

    • Bottom Line

      Dreamhost strikes a near-perfect balance of features and price, but it’s for users who are familiar with website administration. If you don’t have the tools to build your own site or don’t already have one to migrate, Dreamhost might not be for you.

     

 

  • Liquid Web Hosting

    Bottom Line: Liquid Web is expensive and lacks shared Web hosting, but it’s a flexible, feature-packed online host with outstanding customer service.

    • Pros

      Offers Linux- or Windows-based servers. Excellent VPS and dedicated hosting plans. Prorated VPS plans. High-end specs.

    • Cons

      Underwhelming shared hosting storage. Relatively expensive.

    • Bottom Line

      Liquid Web is a flexible, feature-packed online host with outstanding customer service and excellent dedicated and VPS hosting plans, but you’ll spend a pretty penny to experience it.

 

  • Hostwinds Web Hosting

    Bottom Line: Hostwinds is a robust web hosting service that has the tools you need for building highly functional and user-friendly websites. It’s a top choice overall, and it’s particularly strong for d…

    • Pros

      Excellent VPS hosting plans. Good customer service. Linux- or Windows-based server options. Unlimited email and monthly data transfers. Minecraft server hosting.

    • Cons

      Lacks managed WordPress hosting. Difficult-to-find cancellation option.

    • Bottom Line

      Hostwinds offers robust Web hosting options, especially when it comes to the company’s Editors’ Choice-worthy VPS hosting. However, a few minor missteps keep it from being the Web hosting top dog overall.

     

  • TMDHosting Web Hosting

    Bottom Line: TMDHosting is a feature-packed web hosting service that gives you the tools you need to build functional, beautiful websites, particularly those of the WordPress variety.

    • Pros

      Excellent WordPress-based hosting. Cloud hosting options. Good customer service and uptime.

    • Cons

      Some plans lack Windows-based hosting. Limited phone support hours.

    • Bottom Line

      TMD is a feature-packed web hosting service that gives you the tools you need to build functional, beautiful websites, particularly those of the WordPress variety.

 

  • InMotion Web Hosting

    Bottom Line: InMotion is a feature-stacked web hosting service that offers many attractive features, but a few issues keep it from being the top dog.

    • Pros

      Good uptime. Excellent managed WordPress options. All plans offer unlimited email. Lengthy money-back guarantee.

    • Cons

      Lacks Windows servers. Basic Web builder creates dated-looking sites. Need to create separate logins for all add-ons.

    • Bottom Line

      The feature-packed InMotion Hosting offers many free tools for building a website, and it’s PCMag’s top choice for managed WordPress hosting.

 

  • GoDaddy Web Hosting

    Bottom Line: GoDaddy is a feature-packed web hosting service that boasts rock-solid uptime, excellent customer service, and flexible website-building tools.

    • Pros

      Rock-solid uptime. Excellent 24/7 customer support. Windows- and Linux-based servers. Email tightly integrated into Microsoft apps.

    • Cons

      You must pay for the website builder. Intimidating WordPress setup. Skimpy amount of included email.

    • Bottom Line

      GoDaddy is a stacked Web hosting service that boasts dependable uptime, top-notch customer service, and flexible website-building tools, but a few omissions prevent it from taking the Web hosting crown.

 

How To Build A Website – Easy Step By Step Tutorial 2018 / 2019

how to build a website




STEP 1: CHOOSE THE RIGHT PLATFORM


If you want to build a good, mobile friendly and functional website quickly, you’ll need to choose a platform (also known as content management system). What do I mean by “content management system”? Well, back in 2004 when I got started with web development, most sites were built using HTML (code), CSS and even Flash. These took a lot of time to learn and were tricky to master. That’s why most people still think creating a website from scratch is difficult or requires a lot of coding and design skills – but that’s no longer true. In 2018, content management systems (CMS) like WordPress have made creating a website accessible to everyone.



To put simply, a content management system (or website building platform) is a user-friendly platform for building websites and managing your own online content, instead of using a bunch of loose HTML pages.

Most Popular Site Building Platforms in 2018

In recent statistics made by W3Techs, WordPress is the most popular content management system (55%) followed by Joomla (20%) and Drupal (11%).

CMS market share
How people build websites

Here’s why I recommend using WordPress to build your website

WordPress vs. HTML & CSS: Learning HTML from scratch can take 6+ months, yet alone CSS and PHP. Having a basic knowledge of HTML can help you gauge things more quickly, but if you want to create a website within a day or two, learning HTML isn’t a viable option.

WordPress vs. Website Builders: Website builders are expensive and often very limited. They are good for one-page websites, but not more.

WordPress vs. Joomla/DrupalDrupal is a very powerful platform that is popular with web developers and experienced coders, but it comes with a very steep learning curve that makes it a bad choice for beginners. Joomla is similar to WordPress and works great for online stores, but you’ll need at least a little bit of technical coding to make it work the way you want.

If you want more details, I’ve put together a pretty comprehensive comparison between WordPress, Joomla and Drupal.

If for some reason you don’t want to build your site with WordPress, check out my Drupal, Joomla and HTML5 guides as well. They are all FREE to use.

But for beginners, I strongly suggest sticking to WordPress.

It’s the easiest platform I’ve ever worked with, but it’s flexible enough to suit everyone from small business owners, and freelancers to creative artists and bloggers.

THINGS TO DO BEFORE NEXT STEP

checklistChoose a platform to build your website. I’m recommending WordPress which is free to use and easy to understand. In this guide, I’ll be showing you how to create a site using WordPress, too.

checklist

At this point you don’t need to install/download anything. I’ll show you this in the next steps.

 

STEP 2: GET A DOMAIN & WEB HOSTING


Step 2 of creating a websiteIn order to get set up your WordPress (or any other type of websites), you’re going to need two things:

  • A domain name (a web address like yoursitename.com)
  • Hosting (a service that connects your site to the internet)

The WordPress platform itself is free, but a domain name and hosting will cost you around $3 – $5 a month. However it costs less than a coffee, so it won’t break the bank.

Owning your own domain name looks far more professional than having your site on someone else’s domain (like yourbusiness.my-free-website.com), and it’s super affordable, too.

Plus, having your own hosting will also make sure your website loads quickly and won’t go down for hours at a time (pretty important for everyone who visits your pages.)

Where do I get a FREE domain name and hosting?



I’ve mostly used www.Bluehost.com as a web hosting and domain registrar.

They’re really affordable, have good customer service, and they’re currently throwing in a domain name for free – so it’s worth checking them out.

When you get a domain name, you’ll also get a personal email account(s): you@yoursite.com – way more professional than a generic Gmail or Yahoo address.

Already have a domain name and hosting? Go ahead and skip ahead to step 3, where I’ll explain how you can set up your website.

STEP 1: Go Bluehost.com

Remember: Since I’m using Bluehost myself, I’ve negotiated a special discount for VGI visitors (67% OFF).

web hosting landing page

STEP 2: Choose Website Hosting Plan

Once you click “get started now,” you’ll be taken to a page to select the hosting plan of your choice.

I went ahead and selected their “basic” option, which is a great choice for new websites. Plus, at the moment they’re running a special discount of $2.75/mo (usually it’s $7.99/mo)

The “plus” and “prime” plans are great, but you don’t really need all the extra bells and whistles they offer unless there are millions of people flooding your site each day.

Save your hard earned cash and opt for the cheapest package to start out with.



Choose your web hosting plan

STEP 3: Pick a Domain Name

As an easy starting point:

  • If you’re making a website for your business, your domain name should match your company name. For example: YourCompanyName.com
  • If you’re planning to set up a website for yourself, then YourName.com can be a great option.

For this site (WebsiteSetup), I chose WebsiteSetup.org

Domain names usually end with .com, .org or .net, but in recent months, a huge amount of domain extensions (the end part of the web address, like .com) have come out, ranging from .agency to .pizza.

My best advice? Avoid the weird extensions and go with .com, .net or .org unless they perfectly describe what you have to offer – and even then, see if you can find a more common name.

If you’ve already got a domain name, just enter it in and click “Next” on the “I have a domain name” form.

If you aren’t ready to choose a domain right off the bat, you can do it at a later point in your website setup.

Bluehost choose domain name

STEP 4: Fill In Your Details

To create your account, just enter in your personal information on the “create your account” page.

You’ll need to add in your first name, last name, country, street address, city, zip code, phone number, and email address. Your receipt will be sent to the email address you enter here.

It’s optional to also add in your business name within this form.

Your account information

Then, enter in your payment information to continue.

STEP 5: Check Your “Package Information” and Finish Registration

The next step in registering for a Bluehost account is to select you plan and package.

These are the last steps you’ll go through before your account creation is complete, so pay close attention to the extra options available, like Domain Privacy Protection.

Choose add ons and length

  • Domain Privacy Protection is only $0.99 cents more per month, and keeps your personal information under wraps such as your name and address.
  • If you want to keep your website and domain information anonymous, go ahead and spend the extra $0.99 per month. If you don’t, be sure to uncheck this box.

STEP 6: Create Your Password

Once paid and registered, you’ll be able to create your password:

THINGS TO DO BEFORE NEXT STEP:

checklistDo some brainstorming to come up with a unique domain name that reflects your future website, business or blog.

checklist

Secure your domain name and web hosting. For this I recommend Bluehost.com, but you can pick any other web host as long it’s reliable and simple.

UPDATE: I made a simple guide for Bluehost (which package to choose & how to install WordPress).


Recommended:


STEP 3: SET UP & CUSTOMIZE YOUR SITE


Once you’ve bought your domain name and set up your hosting, you’re well on your way!

Now it’s time to get your website up and running. The first thing you’ll need to do is install WordPress to your domain.

Installing WordPress

There are two possible ways to install WordPress, one MUCH easier than the other.

1. TO CREATE A WEBSITE WITH WORDPRESS (OR JOOMLA & DRUPAL), USE ONE CLICK INSTALLATION:

Almost every reliable and well-established hosting company has integrated 1-click-installation for WordPress, which makes getting going a snap.

If you signed up with Bluehost or any other similar hosting company, you should find your “1-click-installation” in your account control panel.

Here are the steps you should follow (should be similar/same on all the major web hosting companies):

  1. Log in to your hosting account.
  2. Go to your control panel.
  3. Look for the “WordPress” or “Website” icon.
  4. Choose the domain where you want to install your website.
  5. Click the “Install Now” button and you will get access to your new WordPress website.

Installing WordPress Website

If you’re unable to locate it, look here: How to Install WordPress on Bluehost.

2. … OR MANUAL INSTALL (if needed)

If for some odd reason (some hosting companies don’t provide one-click-install for WordPress) you don’t have the option to install WordPress automatically, look this manual guide below:

Installing WordPress Manually  Pssst – if they don’t have 1-click-installation, maybe you’re dealing with a bad host!

Choosing a Theme/Template for your site

Once you have successfully installed WordPress to your domain, you’ll see a very basic yet clean site:

Basic WordPress website

But you don’t want to look like everyone else, do you?

That’s why you need a theme – a design template that tells WordPress how your website should look. See a sample version below:

Here’s where it gets fun: There are thousands of awesome, professionally designed themes you can choose from and customize for a site that’s all your own.

Here’s how to find a theme you like:

1. Log into your WordPress dashboard

If you’re not sure how, type in: https://yoursite.com/wp-admin (replace “yoursite” with your domain).

This is what the WordPress dashboard looks like:

wordpress_default_dashboard



Everything is easily labelled. If you’re feeling a bit overwhelmed, don’t sweat it – I’m going to show you where to go next.

2. Access FREE themes

Once you’re in the dashboard, you’ve got access to over 1500 free themes! Just look along the side bar for “Appearance”, then click “Themes”.

I’ve even compiled a list of 15 most popular free WordPress themes.

If you want something more professional or elegant than what you find here, you can head over to ThemeForest.net where there’s a HUGE library of themes to pick from at varying costs.

But before you do that, I really suggest you at least try spending some time browsing the free themes. Many of them are actually really professional and well made; so don’t write them off.

free_wordpress_blog_themes

As you can see above, installing a new theme for your website is very easy.

You can search for specific keywords and/or use filters to find themes that suit your style. Finding the perfect theme can take a while, but it’s worth it.

You should also look for themes that are “responsive”, as this means they will look good on any mobile device.

Just punch it in as one of your keywords, and you’ll be all set!

3. Install your new theme

Once you have found a theme you like, installing it is as simple as clicking “Install” followed by “Activate”.

install_theme

IMPORTANT: Changing themes won’t delete your previous posts, pages and content. You can change themes as often as you want without having to worry about lose what you’ve created.

How do I add content and create new pages?

With your theme installed, you’re ready to start creating content. Let’s quickly run through some of the basics:

Adding and editing pages

Want a “Services” page, or an “About Me” page (like I have on my menu at the top of the site)?

1. Look along the sidebar in the WordPress Dashboard for “Pages” -> “Add New”.

2. Once you’ve clicked, you’ll find a screen that looks a lot like what you’ve maybe seen in Microsoft Word. Add text, images and more to build the page you want, then save it when you’re done.

Adding pages to the menu

If you want your new page to be linked to in your navigation bar,

1. Save any changes you’ve made to the page by clicking “Update”

2. Click “Appearance” -> “Menus” in the sidebar of the WordPress Dashboard

3. Find the page you created and add it to the list by clicking the checkbox next to it and then “Add to Menu”.

wordpress_navigation_bar_website

Adding and editing posts

If you have a blog on your website, “Posts” will be where you turn to next. You can use different categories to group similar posts.

If you want to add a blog to your website, you can use different categories and posts. Let’s say you want to create a category named “Blog”. To do so, simply add it to your menu and start making posts.

Here’s what you need to do:

a. Create a new category by going to “Posts -> Categories”

OR

b. Create a blog post by going to “Posts -> Add New”. Once you’ve finished writing your blog post, you need to add the right category for it.

Once you’ve created your category, simply add it to the menu, and you’re in business!

Customization & Endless Tweaks…

In this section I’ll cover some of the basic things I’m asked about all the time that will help you to tweak your website.

Changing Your Title and Tagline

Page titles explain to searchers what your website is about, and they’re also a big part of how search engines determine your rankings, so you want to be sure they’ve got the keywords you want to target in them (but in a natural way, written for real people).

You should use a unique title on every page of your site. For example, my site’s title is “How to Make a Website”.

(Can’t find it? Just hold your mouse over the tab at the top of your web browser).

Taglines are added at the end of titles across every page. My site’s tagline is “Step by Step Guide”

In order to change the title and tagline on your website, go to “Settings -> General” and fill in the form below:

site-title-and-tagline

Disabling Comments for Posts & Pages

Some websites (business/organisation sites mostly) don’t want their visitors to be able to comment on their pages.

Here’s how to shut comments off on WordPress pages:

1. While you are writing a new page, click “Screen Options” in the top right corner.

2. Click the “Discussion” box. The “Allow Comments” box will appear at the bottom.

3. Untick “Allow Comments”.

Want to disable comments on every new page by default?

1. Go to “Settings -> Discussion” and untick “Allow people to post comments on new articles”

site_discussion-settings

Setting Up a Static Front Page

Some people contact me saying they’re frustrated that their home page looks like a blog post. You can fix that by making your home page “static”.

A static page is a page that doesn’t change. Unlike a blog, where the first new article will show up at the top every time, a “static” page will show the same content every time someone comes to the site – like a home page you’ve designed.

To set up a static front page:

1. Go to “Settings -> Reading”

2. Choose a static page that you have created. “Front Page” denotes your home page, “Posts page” is the front page of your blog (if your entire site isn’t a blog).

If you don’t choose a static page on your own, WordPress will take your latest posts and start showing them on your homepage.

static_homepage

Editing sidebar

Most WordPress themes have a sidebar on the right side (in some cases it’s on the left).

If you want to get rid of the sidebar or edit out items you do not need like “Categories”, “Meta” and “Archives”, which are usually pointless, here’s how:

1. Go to “Appearance -> Widgets” in the WordPress Dashboard.

2. From here, you can use drag and drop to add different “boxes” to your sidebar, or remove the items you don’t want.

There’s also a “HTML box” – a text box where you can use HTML code. For beginners, don’t worry about this bit – just drag and drop the elements you’d like in your sidebar.

Installing Plugins to Get More out of WordPress

What is a plugin?

“Plugins” are extensions that are built to expand WordPress’ capabilities, adding features and functions to your site that don’t come built-in.

They’re shortcuts to getting your site to do what you want to, without having to build the feature from scratch.

You can use plugins to do everything from adding photo galleries and submission forms to optimizing your website and creating an online store.

How do I install a new Plugin?

To start installing plugins, go to “Plugins -> Add New” and simply start searching.

Keep in mind that there are over 25,000 different FREE plugins, so you’ve got a LOT to choose from!

Installation is easy – once you find a plugin you like, just click “Install”.

BUT – before you go and install every single one, I suggest you read this article: Things you need to know about using WP plugins.

To save you some time, I’ve put together a list of the most popular plugins that webmasters find useful:

  • #1 Contact form 7: My website has a contact form on my About Me page. It’s an awesome feature to have, as people (like you!) can fill in the form and send me an email without logging into their own email provider. If you want to do something similar, definitely get this plugin. P.S. Here’s a step-by-step guide for setting it up.
  • #2 Yoast SEO for WordPress: If you want to make your WordPress site even more SEO-friendly, this plugin is a must-have. It’s free, and it’s awesome. You’ll be able to edit your title tags, meta descriptions and more, all from within the page itself – no more fussing with WordPress settings.
  • #3 Google Analytics: Interested in tracking your visitors/traffic and their behaviour? Just install the plugin, connect it with your Google account and you’re ready to go.

Of course, this is just the tip of the iceberg! Here’s a list of recommended plugins by me.

Congratulations – you’re ready to launch!

If you’ve followed the steps in this guide, you should now have a fully-functional WordPress website! That wasn’t so bad, was it?

Last but not least, keep improving your website.

As I mentioned earlier, WordPress is highly customizable. If you want to truly master WordPress, look no further than this comprehensive guide below:

How to Find Out Who Hosts a Web Site (Webhosting)

who is hosting that website




Here’s a quick little tip for anyone looking for a simple way to find out who is hosting a particular website. Trying to figure out who hosts a web site can be an annoying task if you’re trying to go through the usual channels by searching a WHOIS database, etc. A lot of times you’ll only get the company or person that registered the domain name, but not the actual hosting company.



Who is Hosting This? is a very simple web service whose sole purpose is to tell you the company that is hosting a website. I really like this because most of the other online web site checking tools simply do not give a clear and concise answer to this very simple question.

find web host

I came across this website because I was looking for a for better hosting company, but I first wanted to know what hosting companies some peer sites in my field were using, such as HowToGeek, Labnol.org, etc. I know those sites run smoothly and have millions of visitors every month, so if their servers can handle that traffic, I would be more inclined to go with one of those hosting companies.

Once you type in a domain name, for example, labnol.org, you’ll get your answer right away:

hosting company

DreamHost is actually the hosting company for the Digital Inspiration website. I’ve tried it on a good number of sites and the results have been correct each time. Also, very large sites like Google.com, etc. will not give you any useful information because they have their own IP address ranges and use their own servers. You’ll also see this for other companies like CNET, etc because they manage all of their own hosting.

google hosting

In addition to websites like Google and Facebook, you may also run into smaller websites that use private registration or extra privacy settings at their hosting company. When a domain is private, the information is hidden from public view and you’ll only see information about the company that is being used to hide the registration or nothing at all, like in the example below:

no hosting company

This site does a pretty good job because you can sometimes tell the hosting company by looking at the Name Servers, but here they are simply using the domain name and not the name of the hosting website. Even if you click on the WHOIS link, everything is privately registered.



If you try to look up the IP address, you will have more luck. Once I did a WHOIS lookup on the IP address, I was able to determine the hosting company. You can also try another website like WebHostingHero. Their site was able to give me the correct info.

web host company

But why would you need to know the hosting provider? Here are a few reasons:

1.  Developers Needing a Client’s Information

It may sound strange, but there are times when a client doesn’t know who their hosting provider is! They might have set up the site a long time ago, set up the auto payment and forgotten about it. So when they ask you to access their hosting panel, or change providers, you need to know where their site is hosted.

This tool will give you that information!

2. Identifying Site Scrapers and People Copying your Content

As part of its crackdown on spam, Google and other search engines are very active in barring sites that steal content from others. However, what do you do when you stumble across a page that’s blatantly ripping you off? It’s important to act fast because you don’t want to be misidentified as the site doing the copying instead!

You have the following options:

  1. Sending a cease and desist notice to the site in question;
  2. Filing a complaint with Google for copyright infringement;
  3. Report the problem to the web provider and ask them to take action;

For the third option, you need to know the name of the hosting provider. For example, GoDaddy has a DMCA takedown form for copyright and trademark violations that allows you to submit complaints directly to them. All major web hosting providers have this facility, and the tool on this page will help you identify the entity with whom you need to file a complaint.

3. To Combat Piracy

Closely linked to copyright infringement, is piracy. Let’s say you have a video that you submitted to Youtube and that you’re monetizing with advertisements. You find someone who steals that video and distributes it online either as a file, or directly in their web page. It’s bad enough that they might be taking away your views, but to add insult to injury, they might be deriving advertising revenue from it as well!

This is where you need to know the name of the provider who’s hosting the site. A DMCA takedown notice will be the first step to getting pirated content removed from the Internet, as well as other measures like complaining to the search engines.

4. For Competitor Analysis

Sometimes you might come across a site that runs much better than your own. Perhaps it consistently loads fast, despite having a lot of Javascript/CSS, and it never seems to go down. If you’re having problems with your existing hosting provider, you might consider switching to the one that hosts a particular site.

This tool will allow you to identify the organization behind the website. By migrating your site to a proven hosting provider that can deliver the goods, you’re ensuring that you will receive the same stability and speed that your competitor (or similar website) enjoys.

That’s about it! Overall, you should really run into very few issues when trying to determine the hosting company for a website. If you do, someone is really trying hard to hide his/her server from the public.

Find out who hosts this website manually in three steps

  1. Use ping to find the IP address.
  2. Use WHOIS to find the host information.
  3. Use a dedicated service to look up details.

For this article, we’ll be using screenshots from a Mac, but equivalent tools exist for Windows and Linux systems, as well.

Know these key terms before you get started

Finding out who hosts this website in question can take a little detective work, and there are a few terms that we need to know before we take on the case. Let’s just keep things simple with short definitions, in layman’s terms:

  • Ping — A tool that will return the IP address of the web server.
  • WHOIS — A lookup that can tell who is hosting my domain, where it was registered and what the Domain Name Server is.
  • Registrar — A company that help you look up and register a domain name.
  • DNS — A Domain Name Server translates a domain name to an IP address, so you load the correct server based on the domain name requested.
  • MX Record — A Mail eXchange Record lets email live on a server other than the one hosting the website, telling you where email is delivered.

Sometimes, you only need to try one of these to discover who hosts a website. Other times, you need all of them, or combinations — like getting the IP address of a server, and then Googling it to find out who owns the DNS of a certain domain. With that in mind, let’s get started.



Use ping to get the IP address for a website

The first step is always to “ping” the address. Simply go to your device’s terminal application, and enter ping aaronreimann.com. It’s a fairly straightforward operation.

Ping away, and you get something like this:

Who Hosts This Website Ping Terminal

From here, you can enter the IP address in your browser. Sometimes it will return a landing page for that server, revealing the hosting company’s logo. If that doesn’t work, I like to use HostingCompass, which lets you simply type in an IP address to discover important information about who is hosting my domain in question:

Who Hosts This Website Hosting Compass

Use WHOIS to discover who hosts this website

Who is what? WHOIS is the second step on the trail as we hunt down who hosts this website we’re after. You can simply go into terminal (or a shell, depending your operating system) and type in whois domainname.dev. Be sure to replace domainname.dev with the actual domain in question.

For this site, I’ll be using my domain name, aaronreimann.com, and my dad’s domain name, jimreimann.com. I’m using two different ones because each domain name can be a totally different. In this case, my dad’s domain is simple. I go into terminal, type in whois jimreimann.com, and here’s what I get:

Who Hosts This Website WHOIS Terminal

It’s pretty straightforward: the registrar is GoGaddy and the DNS is A2 Web Hosting. If this were my client, I would need them to share their credentials for GoDaddy and A2 Web Hosting before I could log in to work on their site. But what if we enter whois aaronreimann.com?

Who Hosts This Website WHOIS AaronReimann

Here’s where the detective work gets a little more complex.

 

Cloudflare isn’t a web host. We can’t see where it’s pointing through the WHOIS lookup. You can go to cloudflare.com to login, assuming your client can provide that login information. From there you will be able to get an A record that reveals where aaronreimann.com is really pointing.

This A record will give you the IP address of the server who is hosting this website. Simply open a browser, and then enter the IP address. That should take you to a generic hosting page showing where the site is hosted, or you can use the method we just covered to get information about the IP address.

 

Use a dedicated service to see who hosts this website

One of the most common services is WhoIsHostingThis.com, but nothing is perfect. For example, some hosting companies have their whole infrastructure set up on a data center. Tools will then return information about the data center’s network, not the hosting company using it.

What if the website is privately registered?

This isn’t as complex as some might think. Private registration masks who registered the domain, but it doesn’t hide the Registrar and DNS.

Even if a domain name is registered privately, you should be able to use the methods above to determine the hosting provider.

How do you find out where email is hosted?

Out of everything we’ve just covered, finding where email is hosted is easiest. If you’re on a Mac or Linux machine, there are some great command-line tools like dig and host that can quickly reveal MX records. Here are two examples:

Open terminal and type in digaaronreimann.com mx +short, and it will return the MX records:

Who Hosts This Website Dig MX Records

Or go to terminal, and then enter host -t mx aaronreimann.com:

Who Hosts This Website Host MX Records

If you’re using Windows, or aren’t comfortable with command line, you can still turn to a few web tools to make these procedures more user friendly. One of the most popular is MX Toolbox. It will return MX records and give you its best guess at where the email is hosted. If the MX lookup returns something less obvious, just grab the domain name that the MX lookup does return, and then use the other tools you just learned about to drop in the domain.

Closing thoughts on discovering who hosts a website

There are a lot of tools out there to begin the searching for who hosts this website that’s been a mystery. Some of them are command line, some online. With a combination of these methods, you’ll find the answers you need.

 

If you find this article useful feel free to share it. Thx.

How to check if a website is safe – 2018 / 2019

check if the website is safe to visit




Not sure if a website is safe to visit? Afraid a sketchy video streaming site might infect your PC? Looking for an e-commerce store to buy from and not sure which you can trust your credit card with? It’s good to be cautious, and it’s absolutely vital to check that a website is safe before sharing any personal information (e.g., credit card numbers, passwords, addresses, etc.). In this how-to, I’ll offer some quick and easy tips to help you avoid dodgy URLs and verify the trustworthiness of any website and if a website is safe.



 

Be sure you trust a site before entering any personal info.

#1  Use your browser safety tools

Today’s most popular web browsers already include security features to help you stay safer online. These built-in browser tools can block annoying popups, send Do Not Track requests to websites, disable unsafe Flash content, stop malicious downloads, and control which sites can access your webcam, microphone, etc.

Take a moment to review your settings now. Here’s how to find them:

  • Chrome:  Settings > Advanced > Privacy and security
  • Edge:  Settings > Advanced settings
  • Firefox:  Options > Privacy & Security
  • Safari:  Preferences > Security and Preferences > Privacy

#2  Double-check URLs

This really goes without saying, but I’ll say it anyway: Before you click a link, make sure you know where it’s going to take you. Just mouseover over any link to verify the URL it’s really linked to.



Try hovering your mouse over this

Hover your mouse over the link above, but don’t click it. You should see the URL that it links to at the bottom-left of your browser: https://www.very-good-idea.com. Easy, right?

Make sure the URLs are spelled correctly, too. Most people only glance over text on the web. Hackers know this and will often substitute visually similar characters (e.g., “Yah00.com” instead of “Yahoo.com”) to trick you into visiting their phishing sites and unwittingly giving them your passwords, credit card numbers, and other private data. Don’t fall for this trick. It only takes a moment to verify a URL is safe. And it’s worth it.

#3  Check for HTTPS

HTTP (Hypertext Transfer Protocol) is the fundamental protocol for sending data between your web browser and the websites you visit. And HTTPS is just the secure version of this. (The “S” simply stands for “secure”.)

HTTPS is often used for online banking and shopping, because it encrypts your communications to prevent criminals from stealing sensitive information like your credit card numbers and passwords.

So how do you know if a site uses HTTPS? Check for the padlock in your browser’s navigation bar. If you see it, you know the site you’re on is using a trusted SSL digital certificate — in other words, your connection is protected.

Image of Google Chrome browser's address bar with the green padlock circled

If you don’t see the padlock, take your shopping elsewhere.



This isn’t a silver bullet, though. Some phishing websites could be using HTTPS to appear to be legitimate. But the main takeaway is this:  If a website doesn’t have that padlock, don’t enter your password or credit card number.

#4  Run an online website safety check

An objective website safety checker is great for quickly determining which sites are clean and which should be avoided. VirusTotal’s free website security checker is an easy-to-use example of this. Just copy/paste any URL into VirusTotal’s page and hit Enter. Boom! It’s that easy. Give it a shot. And be sure to bookmark the page to use later.

Image of the VirusTotal webpage where you can check if a URL is dangerous

VirusTotal will tell you if a website is dangerous.

#5  Whois lookup the domain owner

Need to know who’s behind a certain website? Do a whois (pronounced “Who is”) lookup to find out who owns the domain, where and when the site was registered, contact information, and more. It’s super easy to do, and you’ll feel like a private eye doing it. Try a whois lookup here.

Image of the Icann webpage, where you can search for info about who's behind a website

Enter any URL to learn who’s really behind the website.

#6  Call the company

Still not sure if the company is legit? Find their contact details and give them a call. Really, you can learn a lot by who answers the phone. If the number doesn’t exist — or if some teenage voice answers with “Dude?” — then something’s probably up. Just trust your gut.

Where do you find a website’s contact details? Look for a “Contact us” or “About us” link near the very top or very bottom of the homepage. Or try a Whois Lookup (tip #5 above) to see if that reveals a phone number.

#7  Install web security tools

Using AVG can also help you avoid dodgy websites. Download AVG AntiVirus for essential protection, including Web Shield to block malicious downloads and Email Shield to block malicious attachments. Or try AVG Internet Security free for 30 days to get our absolute best online protection, including Fake Website Shield to help you avoid phishing sites.


Secure your PC now

 

Did you like this article? Please share it. Thx.

Howto Build a Website / Homepage – Basics 2018 / 2019

howto build a website / homepage




If you can, imagine a time before the invention of the Internet. Websites / Homepages didn’t exist, and books, printed on paper and tightly bound, were your primary source of information. It took a considerable amount of effort—and reading—to track down the exact piece of information you were after. Today you can open a web browser, jump over to your search engine of choice, and search away. Any bit of imaginable information rests at your fingertips. And chances are someone somewhere has built a website with your exact search in mind.



Within this howto I’m going to show you how to build your own websites using the two most dominant computer languages—HTML and CSS.

Before we begin our journey to learn how to build websites with HTML and CSS, it is important to understand the differences between the two languages, the syntax of each language, and some common terminology.

Also check out tutorial about building a website / homepage with WordPress

 

What Are HTML & CSS?

HTML, HyperText Markup Language, gives content structure and meaning by defining that content as, for example, headings, paragraphs, or images. CSS, or Cascading Style Sheets, is a presentation language created to style the appearance of content—using, for example, fonts or colors.

The two languages—HTML and CSS—are independent of one another and should remain that way. CSS should not be written inside of an HTML document and vice versa. As a rule, HTML will always represent content, and CSS will always represent the appearance of that content.

With this understanding of the difference between HTML and CSS, let’s dive into HTML in more detail.

Understanding Common HTML Terms

While getting started with HTML, you will likely encounter new—and often strange—terms. Over time you will become more and more familiar with all of them, but the three common HTML terms you should begin with are elements, tags, and attributes.

Elements

Elements are designators that define the structure and content of objects within a page. Some of the more frequently used elements include multiple levels of headings (identified as <h1> through <h6> elements) and paragraphs (identified as the <p> element); the list goes on to include the <a>, <div>, <span>, <strong>, and <em> elements, and many more.

Elements are identified by the use of less-than and greater-than angle brackets, < >, surrounding the element name. Thus, an element will look like the following:

1
2
<a>

Tags

The use of less-than and greater-than angle brackets surrounding an element creates what is known as a tag. Tags most commonly occur in pairs of opening and closing tags.

An opening tag marks the beginning of an element. It consists of a less-than sign followed by an element’s name, and then ends with a greater-than sign; for example, <div>.

A closing tag marks the end of an element. It consists of a less-than sign followed by a forward slash and the element’s name, and then ends with a greater-than sign; for example, </div>.

The content that falls between the opening and closing tags is the content of that element. An anchor link, for example, will have an opening tag of <a> and a closing tag of </a>. What falls between these two tags will be the content of the anchor link.

So, anchor tags will look a bit like this:

1
2
<a>...</a>

Attributes

Attributes are properties used to provide additional information about an element. The most common attributes include the id attribute, which identifies an element; the class attribute, which classifies an element; the src attribute, which specifies a source for embeddable content; and the href attribute, which provides a hyperlink reference to a linked resource.

Attributes are defined within the opening tag, after an element’s name. Generally attributes include a name and a value. The format for these attributes consists of the attribute name followed by an equals sign and then a quoted attribute value. For example, an <a> element including an href attribute would look like the following:

1
2
<a href="http://shayhowe.com/">Shay Howe</a>

Common HTML Terms Demo

The preceding code will display the text “Shay Howe” on the web page and will take users to http://shayhowe.com/ upon clicking the “Shay Howe” text. The anchor element is declared with the opening <a> and closing </a> tags encompassing the text, and the hyperlink reference attribute and value are declared with href="http://shayhowe.com" in the opening tag.

HTML Syntax Outline
Fig 1HTML syntax outline including an element, attribute, and tag

Now that you know what HTML elements, tags, and attributes are, let’s take a look at putting together our first web page. If anything looks new here, no worries—we’ll decipher it as we go.

Setting Up the HTML Document Structure

HTML documents are plain text documents saved with an .html file extension rather than a .txt file extension. To begin writing HTML, you first need a plain text editor that you are comfortable using. Sadly this does not include Microsoft Word or Pages, as those are rich text editors. Two of the more popular plain text editors for writing HTML and CSS are Dreamweaver and Sublime Text. Free alternatives also include Notepad++ for Windows and TextWrangler for Mac.

All HTML documents have a required structure that includes the following declaration and elements: <!DOCTYPE html>, <html>, <head>, and <body>.

The document type declaration, or <!DOCTYPE html>, informs web browsers which version of HTML is being used and is placed at the very beginning of the HTML document. Because we’ll be using the latest version of HTML, our document type declaration is simply <!DOCTYPE html>. Following the document type declaration, the <html> element signifies the beginning of the document.

Inside the <html> element, the <head> element identifies the top of the document, including any metadata (accompanying information about the page). The content inside the <head> element is not displayed on the web page itself. Instead, it may include the document title (which is displayed on the title bar in the browser window), links to any external files, or any other beneficial metadata.

All of the visible content within the web page will fall within the <body> element. A breakdown of a typical HTML document structure looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Hello World</title>
  </head>
  <body>
    <h1>Hello World</h1>
    <p>This is a web page.</p>
  </body>
</html>

HTML Document Structure Demo

The preceding code shows the document beginning with the document type declaration, <!DOCTYPE html>, followed directly by the <html> element. Inside the <html> element come the <head> and <body> elements. The <head> element includes the character encoding of the page via the <meta charset="utf-8"> tag and the title of the document via the <title> element. The <body> element includes a heading via the <h1> element and a paragraph via the <p> element. Because both the heading and paragraph are nested within the <body> element, they are visible on the web page.

When an element is placed inside of another element, also known as nested, it is a good idea to indent that element to keep the document structure well organized and legible. In the previous code, both the <head> and <body> elements were nested—and indented—inside the <html> element. The pattern of indenting for elements continues as new elements are added inside the <head> and <body> elements.

Self-Closing Elements

In the previous example, the <meta> element had only one tag and didn’t include a closing tag. Fear not, this was intentional. Not all elements consist of opening and closing tags. Some elements simply receive their content or behavior from attributes within a single tag. The <meta> element is one of these elements. The content of the previous <meta> element is assigned with the use of the charset attribute and value. Other common selfclosing elements include

  • <br>
  • <embed>
  • <hr>
  • <img>
  • <input>
  • <link>
  • <meta>
  • <param>
  • <source>
  • <wbr>

The structure outlined here, making use of the <!DOCTYPE html> document type and <html>, <head>, and <body> elements, is quite common. We’ll want to keep this document structure handy, as we’ll be using it often as we create new HTML documents.

Code Validation

No matter how careful we are when writing our code, we will inevitably make mistakes. Thankfully, when writing HTML and CSS we have validators to check our work. The W3C has built both HTML and CSS validators that will scan code for mistakes. Validating our code not only helps it render properly across all browsers, but also helps teach us the best practices for writing code.

In Practice

As web designers and front-end developers, we have the luxury of attending a number of great conferences dedicated to our craft. We’re going to make up our own conference, Styles Conference, and build a website for it throughout the following lessons. Here we go!

  1. Let’s open our text editor, create a new file named index.html, and save it to a location we won’t forget. I’m going to create a folder on my Desktop named “styles- conference” and save this file there; feel free to do the same.
  2. Within the index.html file, let’s add the document structure, including the <!DOCTYPE html> document type and the <html>, <head>, and <body> elements.
    1
    2
    3
    4
    5
    6
    7
    8
    <!DOCTYPE html>
    <html lang="en">
      <head>
      </head>
      <body>
      </body>
    </html>
    
  3. Inside the <head> element, let’s add <meta> and <title> elements. The <meta> element should include the proper charset attribute and value, while the <title> element should contain the title of the page—let’s say “Styles Conference.”
    1
    2
    3
    4
    5
    <head>
      <meta charset="utf-8">
      <title>Styles Conference</title>
    </head>
    
  4. Inside the <body> element, let’s add <h1> and <p> elements. The <h1> element should include the heading we wish to include—let’s use “Styles Conference” again—and the <p> element should include a simple paragraph to introduce our conference.
    1
    2
    3
    4
    5
    <body>
      <h1>Styles Conference</h1>
      <p>Every year the brightest web designers and front-end developers descend on Chicago to discuss the latest technologies. Join us this August!</p>
    </body>
    
  5. Now it’s time to see how we’ve done! Let’s go find our index.html file (mine is within the “styles-conference” folder on my Desktop). Double-clicking this file or dragging it into a web browser will open it for us to review.
Styles Conference website
Fig 1Our first steps into building our Styles Conference website

Let’s switch gears a bit, moving away from HTML, and take a look at CSS. Remember, HTML will define the content and structure of our web pages, while CSS will define the visual style and appearance of our web pages.

Understanding Common CSS Terms

In addition to HTML terms, there are a few common CSS terms you will want to familiarize yourself with. These terms include selectors, properties, and values. As with the HTML terminology, the more you work with CSS, the more these terms will become second nature.

Selectors

As elements are added to a web page, they may be styled using CSS. A selector designates exactly which element or elements within our HTML to target and apply styles (such as color, size, and position) to. Selectors may include a combination of different qualifiers to select unique elements, all depending on how specific we wish to be. For example, we may want to select every paragraph on a page, or we may want to select only one specific paragraph on a page.

Selectors generally target an attribute value, such as an id or class value, or target the type of element, such as <h1> or <p>.

Within CSS, selectors are followed with curly brackets, {}, which encompass the styles to be applied to the selected element. The selector here is targeting all <p> elements.

1
2
p { ... }

Properties

Once an element is selected, a property determines the styles that will be applied to that element. Property names fall after a selector, within the curly brackets, {}, and immediately preceding a colon, :. There are numerous properties we can use, such as background, color, font-size, height, and width, and new properties are often added. In the following code, we are defining the color and font-size properties to be applied to all <p> elements.

1
2
3
4
5
p {
  color: ...;
  font-size: ...;
}

Values

So far we’ve selected an element with a selector and determined what style we’d like to apply with a property. Now we can determine the behavior of that property with a value. Values can be identified as the text between the colon, :, and semicolon, ;. Here we are selecting all <p> elements and setting the value of the color property to be orange and the value of the font-size property to be 16 pixels.

1
2
3
4
5
p {
  color: orange;
  font-size: 16px;
}

To review, in CSS our rule set begins with the selector, which is immediately followed by curly brackets. Within these curly brackets are declarations consisting of property and value pairs. Each declaration begins with a property, which is followed by a colon, the property value, and finally a semicolon.

It is a common practice to indent property and value pairs within the curly brackets. As with HTML, these indentations help keep our code organized and legible.

CSS Syntax Outline
Fig 1CSS syntax outline including a selector, properties, and values

Knowing a few common terms and the general syntax of CSS is a great start, but we have a few more items to learn before jumping in too deep. Specifically, we need to take a closer look at how selectors work within CSS.

Working with Selectors

Selectors, as previously mentioned, indicate which HTML elements are being styled. It is important to fully understand how to use selectors and how they can be leveraged. The first step is to become familiar with the different types of selectors. We’ll start with the most common selectors: type, class, and ID selectors.

Type Selectors

Type selectors target elements by their element type. For example, should we wish to target all division elements, <div>, we would use a type selector of div. The following code shows a type selector for division elements as well as the corresponding HTML it selects.

CSS
1
2
div { ... }
HTML
1
2
3
<div>...</div>          
<div>...</div>

Class Selectors

Class selectors allow us to select an element based on the element’s class attribute value. Class selectors are a little more specific than type selectors, as they select a particular group of elements rather than all elements of one type.

Class selectors allow us to apply the same styles to different elements at once by using the same class attribute value across multiple elements.

Within CSS, classes are denoted by a leading period, ., followed by the class attribute value. Here the class selector will select any element containing the class attribute value of awesome, including both division and paragraph elements.

CSS
1
2
.awesome { ... }
HTML
1
2
3
<div class="awesome">...</div>
<p class="awesome">...</p>

ID Selectors

ID selectors are even more precise than class selectors, as they target only one unique element at a time. Just as class selectors use an element’s class attribute value as the selector, ID selectors use an element’s id attribute value as a selector.

Regardless of which type of element they appear on, id attribute values can only be used once per page. If used they should be reserved for significant elements.

Within CSS, ID selectors are denoted by a leading hash sign, #, followed by the id attribute value. Here the ID selector will only select the element containing the id attribute value of shayhowe.

CSS
1
2
#shayhowe { ... }
HTML
1
2
<div id="shayhowe">...</div>

Additional Selectors

Selectors are extremely powerful, and the selectors outlined here are the most common selectors we’ll come across. These selectors are also only the beginning. Many more advanced selectors exist and are readily available. When you feel comfortable with these selectors, don’t be afraid to look into some of the more advanced selectors.

All right, everything is starting to come together. We add elements to a page inside our HTML, and we can then select those elements and apply styles to them using CSS. Now let’s connect the dots between our HTML and CSS, and get these two languages working together.

Referencing CSS

In order to get our CSS talking to our HTML, we need to reference our CSS file within our HTML. The best practice for referencing our CSS is to include all of our styles in a single external style sheet, which is referenced from within the <head> element of our HTML document. Using a single external style sheet allows us to use the same styles across an entire website and quickly make changes sitewide.



Other Options for Adding CSS

Other options for referencing CSS include using internal and inline styles. You may come across these options in the wild, but they are generally frowned upon, as they make updating websites cumbersome and unwieldy.

To create our external CSS style sheet, we’ll want to use our text editor of choice again to create a new plain text file with a .css file extension. Our CSS file should be saved within the same folder, or a subfolder, where our HTML file is located.

Within the <head> element of the HTML document, the <link> element is used to define the relationship between the HTML file and the CSS file. Because we are linking to CSS, we use the rel attribute with a value of stylesheet to specify their relationship. Furthermore, the href (or hyperlink reference) attribute is used to identify the location, or path, of the CSS file.

Consider the following example of an HTML document <head> element that references a single external style sheet.

1
2
3
4
<head>
  <link rel="stylesheet" href="main.css">
</head>

In order for the CSS to render correctly, the path of the href attribute value must directly correlate to where our CSS file is saved. In the preceding example, the main.css file is stored within the same location as the HTML file, also known as the root directory.

If our CSS file is within a subdirectory or subfolder, the href attribute value needs to correlate to this path accordingly. For example, if our main.css file were stored within a subdirectory named stylesheets, the href attribute value would be stylesheets/main.css, using a forward slash to indicate moving into a subdirectory.

At this point our pages are starting to come to life, slowly but surely. We haven’t delved into CSS too much, but you may have noticed that some elements have default styles we haven’t declared within our CSS. That is the browser imposing its own preferred CSS styles for those elements. Fortunately we can overwrite these styles fairly easily, which is what we’ll do next using CSS resets.

Using CSS Resets

Every web browser has its own default styles for different elements. How Google Chrome renders headings, paragraphs, lists, and so forth may be different from how Internet Explorer does. To ensure cross-browser compatibility, CSS resets have become widely used.

CSS resets take every common HTML element with a predefined style and provide one unified style for all browsers. These resets generally involve removing any sizing, margins, paddings, or additional styles and toning these values down. Because CSS cascades from top to bottom—more on that soon—our reset needs to be at the very top of our style sheet. Doing so ensures that those styles are read first and that all of the different web browsers are working from a common baseline.

There are a bunch of different resets available to use, all of which have their own fortes. One of the most popular resets is Eric Meyer’s reset, which has been adapted to include styles for the new HTML5 elements.

If you are feeling a bit more adventurous, there is also Normalize.css, created by Nicolas Gallagher. Normalize.css focuses not on using a hard reset for all common elements, but instead on setting common styles for these elements. It requires a stronger understanding of CSS, as well as awareness of what you’d like your styles to be.

Cross-Browser Compatibility & Testing

As previously mentioned, different browsers render elements in different ways. It’s important to recognize the value in cross-browser compatibility and testing. Websites don’t need to look exactly the same in every browser, but they should be close. Which browsers you wish to support, and to what degree, is a decision you will need to make based on what is best for your website.

In all there are a handful of things to be on the lookout for when writing CSS. The good news is that anything is possible, and with a little patience we’ll figure it all out.

In Practice

Picking back up where we last left off on our conference website, let’s see if we can add in a bit of CSS.

  1. Inside of our “styles-conference” folder, let’s create a new folder named “assets.” We’ll store all of the assets for our website, such as our style sheets, images, videos, and so forth, in this folder. For our style sheets, let’s go ahead and add another folder named “stylesheets” inside the “assets” folder.
  2. Using our text editor, let’s create a new file named main.css and save it within the “stylesheets” folder we just created.
  3. Looking at our index.html file in a web browser, we can see that the <h1> and <p> elements each have default CSS styles. Specifically, they each have a unique font size and spacing around them. Using Eric Meyer’s reset, we can tone down these styles, allowing each of them to be styled from the same base. To do this let’s head over to Eric’s website, copy his reset, and paste it at the top of our main.css file.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    /* http://meyerweb.com/eric/tools/css/reset/ 2. v2.0 | 20110126
      License: none (public domain)
    */
    
    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td,
    article, aside, canvas, details, embed,
    figure, figcaption, footer, header, hgroup,
    menu, nav, output, ruby, section, summary,
    time, mark, audio, video {
      margin: 0;
      padding: 0;
      border: 0;
      font-size: 100%;
      font: inherit;
      vertical-align: baseline;
    }
    /* HTML5 display-role reset for older browsers */
    article, aside, details, figcaption, figure,
    footer, header, hgroup, menu, nav, section {
      display: block;
    }
    body {
      line-height: 1;
    }
    ol, ul {
      list-style: none;
    }
    blockquote, q {
      quotes: none;
    }
    blockquote:before, blockquote:after,
    q:before, q:after {
      content: '';
      content: none;
    }
    table {
      border-collapse: collapse;
      border-spacing: 0;
    }
    
  4. With our main.css file starting to take shape, let’s connect it to our index.html file. Opening the index.html file in our text editor, let’s add the <link> element within our <head> element, just after the <title> element.
  5. Because we’ll be referencing a style sheet within the <link> element, let’s add the relation attribute, rel, with a value of stylesheet.
  6. We also want to include a hyperlink reference, using the href attribute, to our main.css file. Remember, our main.css file is saved within the “stylesheets” folder, which is inside the “assets” folder. Therefore, the href attribute value, which is the path to our main.css file, needs to be assets/stylesheets/main.css.
    1
    2
    3
    4
    5
    6
    <head>
      <meta charset="utf-8">
      <title>Styles Conference</title>
      <link rel="stylesheet" href="assets/stylesheets/main.css">
    </head>
    

Time to check out our work and see if our HTML and CSS are getting along. Now opening our index.html file (or refreshing the page if it’s already opened) within a web browser should show slightly different results than before.

Styles Conference website
Fig 1Our Styles Conference website with a CSS reset

Demo & Source Code

Below you may view the Styles Conference website in its current state, as well as download the source code for the website in its current state.

View the Styles Conference Website or Download the Source Code (Zip file)

Summary

So far, so good! We’ve taken a few big steps in this lesson.

Just think, you now know the basics of HTML and CSS. As we continue and you spend more time writing HTML and CSS, you’ll become much more comfortable with the two languages.

To recap, so far we’ve covered the following:

  • The difference between HTML and CSS
  • Getting acquainted with HTML elements, tags, and attributes
  • Setting up the structure of your first web page
  • Getting acquainted with CSS selectors, properties, and values
  • Working with CSS selectors
  • Referencing CSS in your HTML
  • The value of CSS resets

 

With our introduction to HTML and CSS complete, it’s time to dig a little deeper into HTML and examine the different components that make up this language.

In order to start building websites, we need to learn a little about which HTML elements are best used to display different types of content. It’s also important to understand how elements are visually displayed on a web page, as well as what different elements mean semantically.

Using the proper element for the job goes a long way, and we’ll want to make well-informed decisions in the process.

Semantics Overview

So what exactly are semantics? Semantics within HTML is the practice of giving content on the page meaning and structure by using the proper element. Semantic code describes the value of content on a page, regardless of the style or appearance of that content. There are several benefits to using semantic elements, including enabling computers, screen readers, search engines, and other devices to adequately read and understand the content on a web page. Additionally, semantic HTML is easier to manage and work with, as it shows clearly what each piece of content is about.

Moving forward, as new elements are introduced, we’ll talk about what those elements actually mean and the type of content they best represent. Before we do that, though, let’s look at two elements—<div>s and <span>s—that actually don’t hold any semantic value. They exist for styling purposes only.

Identifying Divisions & Spans

Divisions, or <div>s, and <span>s are HTML elements that act as containers solely for styling purposes. As generic containers, they do not come with any overarching meaning or semantic value. Paragraphs are semantic in that content wrapped within a <p> element is known and understood as a paragraph. <div>s and <span>s do not hold any such meaning and are simply containers.

Block vs. Inline Elements

Most elements are either block- or inline-level elements. What’s the difference?

Block-level elements begin on a new line, stacking one on top of the other, and occupy any available width. Block-level elements may be nested inside one another and may wrap inline-level elements. We’ll most commonly see block-level elements used for larger pieces of content, such as paragraphs.

Inline-level elements do not begin on a new line. They fall into the normal flow of a document, lining up one after the other, and only maintain the width of their content. Inline-level elements may be nested inside one another; however, they cannot wrap block-level elements. We’ll usually see inline-level elements with smaller pieces of content, such as a few words.

Both <div>s and <span>s, however, are extremely valuable when building a website in that they give us the ability to apply targeted styles to a contained set of content.

A <div> is a block-level element that is commonly used to identify large groupings of content, and which helps to build a web page’s layout and design. A <span>, on the other hand, is an inline-level element commonly used to identify smaller groupings of text within a block-level element.

We’ll commonly see <div>s and <span>s with class or id attributes for styling purposes. Choosing a class or id attribute value, or name, requires a bit of care. We want to choose a value that refers to the content of an element, not necessarily the appearance of an element.

For example, if we have a <div> with an orange background that contains social media links, our first thought might be to give the <div> a class value of orange. What happens if that orange background is later changed to blue? Having a class value of orange no longer makes sense. A more sensible choice for a class value would be social, as it pertains to the contents of the <div>, not the style.

1
2
3
4
5
6
7
8
9
<!-- Division -->
<div class="social">
  <p>I may be found on...</p>
  <p>Additionally, I have a profile on...</p>
</div>

<!-- Span -->
<p>Soon we'll be <span class="tooltip">writing HTML</span> with the best of them.</p>

Comments within HTML & CSS

The previous code includes exclamation points within the HTML, and that’s all right. Those are not elements, those are comments.

HTML and CSS give us the ability to leave comments within our code, and any content wrapped within a comment will not be displayed on the web page. Comments help keep our files organized, allow us to set reminders, and provide a way for us to more effectively manage our code. Comments become especially useful when there are multiple people working on the same files.

HTML comments start with <!-- and end with -->. CSS comments start with /* and end with */.

Using Text-Based Elements

Many different forms of media and content exist online; however, text is predominant. Accordingly, there are a number of different elements for displaying text on a web page. For now we’ll focus on the more popular elements, including headings, paragraphs, bold text to show importance, and italics for emphasis. Later, within Lesson 6, “Working with Typography,” we’ll take a closer look at how to style text.

Headings

Headings are block-level elements, and they come in six different rankings, <h1> through <h6>. Headings help to quickly break up content and establish hierarchy, and they are key identifiers for users reading a page. They also help search engines to index and determine the content on a page.

Headings should be used in an order that is relevant to the content of a page. The primary heading of a page or section should be marked up with an <h1> element, and subsequent headings should use <h2>, <h3>, <h4>, <h5>, and <h6> elements as necessary.

Each heading level should be used where it is semantically valued, and should not be used to make text bold or big—there are other, better ways to do that.

Here is an example of HTML for all the different heading levels and the resulting display on a web page.

1
2
3
4
5
6
7
<h1>Heading Level 1</h1>
<h2>Heading Level 2</h2>
<h3>Heading Level 3</h3>
<h4>Heading Level 4</h4>
<h5>Heading Level 5</h5>
<h6>Heading Level 6</h6>

Headings Demo

Paragraphs

Headings are often followed by supporting paragraphs. Paragraphs are defined using the <p> block-level element. Paragraphs can appear one after the other, adding information to a page as desired. Here is an example of how to set up paragraphs.

1
2
3
4
<p>Steve Jobs was a co-founder and longtime chief executive officer at Apple. On June 12, 2005, Steve gave the commencement address at Stanford University.</p>

<p>In his address Steve urged graduates to follow their dreams and, despite any setbacks, to never give up&ndash;advice which he sincerely took to heart.</p>

Paragraphs Demo

Bold Text with Strong

To make text bold and place a strong importance on it, we’ll use the <strong> inline-level element. There are two elements that will bold text for us: the <strong> and <b> elements. It is important to understand the semantic difference between the two.

The <strong> element is semantically used to give strong importance to text, and is thus the most popular option for bolding text. The <b> element, on the other hand, semantically means to stylistically offset text, which isn’t always the best choice for text deserving prominent attention. We have to gauge the significance of the text we wish to set as bold and to choose an element accordingly.

Here are the two HTML options for creating bold text in action:

1
2
3
4
5
6
<!-- Strong importance -->
<p><strong>Caution:</strong> Falling rocks.</p>

<!-- Stylistically offset -->
<p>This recipe calls for <b>bacon</b> and <b>baconnaise</b>.</p>

Bold Text with Strong Demo

Italicize Text with Emphasis

To italicize text, thereby placing emphasis on it, we’ll use the <em> inline-level element. As with the elements for bold text, there are two different elements that will italicize text, each with a slightly different semantic meaning.

The <em> element is used semantically to place a stressed emphasis on text; it is thus the most popular option for italicizing text. The other option, the <i> element, is used semantically to convey text in an alternative voice or tone, almost as if it were placed in quotation marks. Again, we will need to gauge the significance of the text we want to italicize and choose an element accordingly.

Here’s the HTML code for italicizing:

1
2
3
4
5
6
<!-- Stressed emphasis -->
<p>I <em>love</em> Chicago!</p>

<!-- Alternative voice or tone -->
<p>The name <i>Shay</i> means a gift.</p>

Italicize Text with Emphasis Demo

These text-level elements are quite handy for bringing our content to life. In addition to these, there are structurally based elements. Whereas text-based elements identify headings and paragraphs, structural elements identify groupings of content such as headers, articles, footers, and so forth. Let’s take a look.

Building Structure

For the longest time the structure of a web page was built using divisions. The problem was that divisions provide no semantic value, and it was fairly difficult to determine the intention of these divisions. Fortunately HTML5 introduced new structurally based elements, including the <header>, <nav>, <article>, <section>, <aside>, and <footer> elements.

All of these new elements are intended to give meaning to the organization of our pages and improve our structural semantics. They are all block-level elements and do not have any implied position or style. Additionally, all of these elements may be used multiple times per page, so long as each use reflects the proper semantic meaning.

Let’s roll up our sleeves and take a closer look.

Building Structure
Fig 2One possible example of HTML5 structural elements giving meaning to the organization of our pages

Header

The <header> element, like it sounds, is used to identify the top of a page, article, section, or other segment of a page. In general, the <header> element may include a heading, introductory text, and even navigation.

1
2
<header>...</header>

<header> vs. <head> vs. <h1> through <h6> Elements

It is easy to confuse the <header> element with the <head> element or the heading elements, <h1> through <h6>. They all have different semantic meanings and should be used according to their meanings. For reference…

The <header> element is a structural element that outlines the heading of a segment of a page. It falls within the <body> element.

The <head> element is not displayed on a page and is used to outline metadata, including the document title, and links to external files. It falls directly within the <html> element.

Heading elements, <h1> through <h6>, are used to designate multiple levels of text headings throughout a page.

Navigation

The <nav> element identifies a section of major navigational links on a page. The <nav> element should be reserved for primary navigation sections only, such as global navigation, a table of contents, previous/next links, or other noteworthy groups of navigational links.

Most commonly, links included within the <nav> element will link to other pages within the same website or to parts of the same web page. Miscellaneous one-off links should not be wrapped within the <nav> element; they should use the anchor element, <a>, and the anchor element alone.

1
2
<nav>...</nav>

Article

The <article> element is used to identify a section of independent, self-contained content that may be independently distributed or reused. We’ll often use the <article> element to mark up blog posts, newspaper articles, user-submitted content, and the like.

When deciding whether to use the <article> element, we must determine if the content within the element could be replicated elsewhere without any confusion. If the content within the <article> element were removed from the context of the page and placed, for example, within an email or printed work, that content should still make sense.

1
2
<article>...</article>

Section

The <section> element is used to identify a thematic grouping of content, which generally, but not always, includes a heading. The grouping of content within the <section> element may be generic in nature, but it’s useful to identify all of the content as related.

The <section> element is commonly used to break up and provide hierarchy to a page.

1
2
<section>...</section>

Deciding Between <article>, <section>, or <div> Elements

At times it becomes fairly difficult to decide which element—<article>, <section>, or <div>—is the best element for the job based on its semantic meaning. The trick here, as with every semantic decision, is to look at the content.

Both the <article> and <section> elements contribute to a document’s structure and help to outline a document. If the content is being grouped solely for styling purposes and doesn’t provide value to the outline of a document, use the <div> element.

If the content adds to the document outline and it can be independently redistributed or syndicated, use the <article> element.

If the content adds to the document outline and represents a thematic group of content, use the <section> element.

Aside

The <aside> element holds content, such as sidebars, inserts, or brief explanations, that is tangentially related to the content surrounding it. When used within an <article> element, for example, the <aside> element may identify content related to the author of the article.

We may instinctively think of an <aside> element as an element that appears off to the left or right side of a page. We have to remember, though, that all of the structural elements, including the <aside> element, are block-level elements and as such will appear on a new line, occupying the full available width of the page or of the element they are nested within, also known as their parent element.

1
2
<aside>...</aside>

We’ll discuss how to change the position of an element, perhaps placing it to the right or left of a group of content, in Lesson 5, “Positioning Content.”

Footer

The <footer> element identifies the closing or end of a page, article, section, or other segment of a page. Generally the <footer> element is found at the bottom of its parent. Content within the <footer> element should be relative information and should not diverge from the document or section it is included within.

1
2
<footer>...</footer>

With structural elements and text-based elements under our belts, our HTML knowledge is really starting to come together. Now is a good time to revisit our Styles Conference website and see if we can provide it with a little better structure.

In Practice

Currently, our Styles Conference website lacks real structure—and content for that matter. Let’s take some time to flesh out our home page a bit.

  1. Using our existing index.html file, let’s add in a <header> element. Our <header> element should include our existing <h1> element; let’s also add an <h3> element as a tagline to support our <h1> element.
    1
    2
    3
    4
    5
    <header>
      <h1>Styles Conference</h1>
      <h3>August 24&ndash;26th &mdash; Chicago, IL</h3>
    </header>
    
  2. After our <header> element, let’s add a new group of content, using the <section> element, that introduces our conference. We’ll begin this section with a new <h2> element and end it with our existing paragraph.
    1
    2
    3
    4
    5
    <section>
      <h2>Dedicated to the Craft of Building Websites</h2>
      <p>Every year the brightest web designers and front-end developers descend on Chicago to discuss the latest technologies. Join us this August!</p>
    </section>
    
  3. Following the introduction to our conference, let’s add another group of content that teases a few of the pages we’ll be adding, specifically the Speakers, Schedule, and Venue pages. Each of the pages we’re teasing should also reside within its own section and include supporting text.

    We’ll group all of the teasers inside a <section> element, and each individual teaser will be wrapped within a <section> element as well. In all, we’ll have three <section> elements inside another <section> element, which is all right.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <section>
    
      <section>
        <h5>Speakers</h5>
        <h3>World-Class Speakers</h3>
        <p>Joining us from all around the world are over twenty fantastic speakers, here to share their stories.</p>
      </section>
    
      ...
    
    </section>
    
  4. Lastly, let’s add our copyright within the <footer> element at the end of our page. To do so let’s use the <small> element, which semantically represents side comments and small print—perfect for our copyright.

    Generally, content within the <small> element will be rendered as, well, small, but our CSS reset will prevent that from happening.

    1
    2
    3
    4
    <footer>
      <small>&copy; Styles Conference</small>
    </footer>
    

Now we can see our home page beginning to come to life.

Styles Conference website
Fig 2Our home page after adding more content and structure

Encoding Special Characters

The <h3> element within our <header> element, as well as the <small> element within our <footer> element, has some interesting things going on. Specifically, a few special characters within these elements are being encoded.



Special characters include various punctuation marks, accented letters, and symbols. When typed directly into HTML, they can be misunderstood or mistaken for the wrong character; thus they need to be encoded.

Each encoded character will begin with an ampersand, &, and end with a semicolon, ;. What falls between the ampersand and semicolon is a character’s unique encoding, be it a name or numeric encoding.

For example, we would encode the word “resumé” as resum&eacute;. Within our header we have encoded both en and em dashes, and within our footer we have encoded the copyright symbol. For reference, a long list of character encodings may be found at Copy Paste Character.

With our home page taking shape, let’s take a look at creating hyperlinks so that we may add additional pages and build out the rest of our website.

Along with text, one of the core components of the Internet is the hyperlink, which provides the ability to link from one web page or resource to another. Hyperlinks are established using the anchor, <a>, inline-level element. In order to create a link from one page (or resource) to another, the href attribute, known as a hyperlink reference, is required. The href attribute value identifies the destination of the link.

For example, clicking the text “Shay,” which is wrapped inside the anchor element with the href attribute value of http://shayhowe.com, will take users to my website.

1
2
<a href="http://shayhowe.com">Shay</a>

Creating Hyperlinks Demo

Wrapping Block-Level Elements with Anchors

By nature the anchor element, <a>, is an inline element, and, according to web standards, inline-level elements may not wrap block-level elements. With the introduction of HTML5, however, anchor elements specifically have permission to wrap either block-, inline-, or any other level elements. This is a break from the standard convention, but it’s permissible in order to enable entire blocks of content on a page to become links.

Relative & Absolute Paths

The two most common types of links are links to other pages of the same website and links to other websites. These links are identified by their href attribute values, also known as their paths.

Links pointing to other pages of the same website will have a relative path, which does not include the domain (.com, .org, .edu, etc.) in the href attribute value. Because the link is pointing to another page on the same website, the href attribute value needs to include only the filename of the page being linked to: about.html, for example.

Should the page being linked to reside within a different directory, or folder, the href attribute value needs to reflect this as well. Say the about.html page resides within the pages directory; the relative path would then be pages/about.html.

Linking to other websites outside of the current one requires an absolute path, where the href attribute value must include the full domain. A link to Google would need the href attribute value of http://google.com, starting with http and including the domain, .com in this case.

Here clicking on the text “About” will open the about.html page inside our browser. Clicking the text “Google,” on the other hand, will open http://google.com/ within our browser.

1
2
3
4
5
6
<!-- Relative Path -->
<a href="about.html">About</a>

<!-- Absolute Path -->
<a href="http://www.google.com/">Google</a>

Linking to an Email Address

Occasionally we may want to create a hyperlink to our email address—for example, hyperlink text that says “Email Me,” which when clicked opens a user’s default email client and pre-populates part of an email. At a minimum the email address to which the email is being sent is populated; other information such as a subject line and body text may also be included.

To create an email link, the href attribute value needs to start with mailto: followed by the email address to which the email should be sent. To create an email link to shay@awesome.com, for example, the href attribute value would be mailto:shay@awesome.com.

Additionally, subject, body text, and other information for the email may be populated. To add a subject line, we’ll include the subject= parameter after the email address. The first parameter following the email address must begin with a question mark, ?, to bind it to the hyperlink path. Multiple words within a subject line require that spaces be encoded using %20.

Adding body text works in the same way as adding the subject, this time using the body= parameter in the href attribute value. Because we are binding one parameter to another we need to use the ampersand, &, to separate the two. As with the subject, spaces must be encoded using %20, and line breaks must be encoded using %0A.

Altogether, a link to shay@awesome.com with the subject of “Reaching Out” and body text of “How are you” would require an href attribute value of mailto:shay@awesome.com?subject=Reaching%20Out&body=How%20are%20you.

Here’s the full breakdown:

1
2
<a href="mailto:shay@awesome.com?subject=Reaching%20Out&body=How%20are%20you">Email Me</a>

Opening Links in a New Window

One feature available with hyperlinks is the ability to determine where a link opens when clicked. Typically, links open in the same window from which they are clicked; however, links may also be opened in new windows.

To trigger the action of opening a link in a new window, use the target attribute with a value of _blank. The target attribute determines exactly where the link will be displayed, and the _blank value specifies a new window.

To open http://shayhowe.com/ in a new window, the code would look like this:

1
2
<a href="http://shayhowe.com/" target="_blank">Shay Howe</a>

Linking to Parts of the Same Page

Periodically we’ll see hyperlinks that link to part of the same page the link appears on. A common example of these same-page links are “Back to top” links that return a user to the top of a page.

We can create an on-page link by first setting an id attribute on the element we wish to link to, then using the value of that id attribute within an anchor element’s href attribute.

Using the “Back to top” link as an example, we can place an id attribute value of top on the <body> element. Now we can create an anchor element with an href attribute value of #top, pound sign and all, to link to the beginning of the <body> element.

Our code for this same-page link would look like the following:

1
2
3
4
5
6
<body id="top">
  ...
  <a href="#top">Back to top</a>
  ...
</body>

Hyperlinks are incredibly useful and have revolutionized how we use the Internet. So far we’ve covered how to link to other pages or websites, as well as how to create email links and links to parts of the same page. Before we go any further, let’s create some links of our own.

In Practice

It’s time to take Styles Conference from a single-page website to a full-blown website with multiple pages, all of which will be linked together using hyperlinks.

  1. We’ll begin by making our “Styles Conference” text inside the <h1> element within our <header> element link to the index.html page.

    Because we are already on the index.html page, this may seem a little odd—and rightfully so—but as the header is replicated on other pages, linking back to the home page will make sense.

    1
    2
    3
    4
    <h1>
      <a href="index.html">Styles Conference</a>
    </h1>
    
  2. In order to navigate across all of the different pages, we’re going add in a navigation menu, using the <nav> element, within our <header> element. We’ll be creating Speakers, Schedule, Venue, and Register pages to go with our home page, so we should create links for all of them.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <header>
    
      ...
    
      <nav>
        <a href="index.html">Home</a>
        <a href="speakers.html">Speakers</a>
        <a href="schedule.html">Schedule</a>
        <a href="venue.html">Venue</a>
        <a href="register.html">Register</a>
      </nav>
    
    </header>
    
  3. Let’s also add the same navigation menu from our <header> element to our <footer> element for convenience.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <footer>
    
      ...
    
      <nav>
        <a href="index.html">Home</a>
        <a href="speakers.html">Speakers</a>
        <a href="schedule.html">Schedule</a>
        <a href="venue.html">Venue</a>
        <a href="register.html">Register</a>
      </nav>
    
    </footer>
    
  4. Within the <section> element that introduces our conference, just below our header, we should also include a link to register for the conference. Placing a link below the paragraph will work perfectly.
    1
    2
    3
    4
    5
    6
    7
    8
    <section>
    
      ...
    
      <a href="register.html">Register Now</a>
    
    </section>
    
  5. We can’t forget to add links to all of the sections teasing our other pages. Inside each section, let’s wrap both the <h3> and <h5> elements within an anchor element linking to the proper page.

    We’ll want to make sure we do this for every section accordingly.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <section>
    
      <section>
        <a href="speakers.html">
          <h5>Speakers</h5>
          <h3>World-Class Speakers</h3>
        </a>
        <p>Joining us from all around the world are over twenty fantastic speakers, here to share their stories.</p>
      </section>
    
      ...
    
    </section>
    
  6. Now we need to create a handful of new pages. Let’s create speakers.html, schedule.html, venue.html, and register.html files. These files should live within the same folder as the index.html file, and, because we’re keeping them inside the same folder, all of our links should work as expected.

    To ensure that all of our pages look the same, let’s make sure that all of these new files have the same document structure and <header> and <footer> elements as the index.html file.

It’s official, we’re no longer working with a single page but indeed a full website.

Styles Conference website
Fig 2Our home page after all of the different links and navigation have been added

Demo & Source Code

Below you may view the Styles Conference website in its current state, as well as download the source code for the website in its current state.

View the Styles Conference Website or Download the Source Code (Zip file)

Summary

Semantics, as discussed within this lesson, are essential for providing our HTML with structure and meaning. Moving forward we’ll periodically introduce new elements, all of which will come with their own semantic meaning. It is the meaning of all of these elements that will provide our content with the most value.

Once again, in this lesson we covered the following:

  • What semantics are and why they are important
  • <div>s and <spans>s, and the difference between block- and inline-level elements
  • Which text-based elements best represent the content of a page
  • The HTML5 structural elements and how to define the structure and organization of our content and page
  • How to use hyperlinks to navigate between web pages or websites

Hopefully you’re starting to feel pretty good about HTML. There is still quite a bit to learn, but the foundation is in place. Next up, we’ll take a deeper look into CSS.

Getting to Know CSS

CSS is a complex language that packs quite a bit of power.

It allows us to add layout and design to our pages, and it allows us to share those styles from element to element and page to page. Before we can unlock all of its features, though, there are a few aspects of the language we must fully understand.

First, it’s crucial to know exactly how styles are rendered. Specifically, we’ll need to know how different types of selectors work and how the order of those selectors can affect how our styles are rendered. We’ll also want to understand a few common property values that continually appear within CSS, particularly those that deal with color and length.

Let’s look under the hood of CSS to see exactly what is going on.

The Cascade

We’ll begin breaking down exactly how styles are rendered by looking at what is known as the cascade and studying a few examples of the cascade in action. Within CSS, all styles cascade from the top of a style sheet to the bottom, allowing different styles to be added or overwritten as the style sheet progresses.

For example, say we select all paragraph elements at the top of our style sheet and set their background color to orange and their font size to 24 pixels. Then towards the bottom of our style sheet, we select all paragraph elements again and set their background color to green, as seen here.

1
2
3
4
5
6
7
8
p {
  background: orange;
  font-size: 24px;
}
p {
  background: green;
}

Because the paragraph selector that sets the background color to green comes after the paragraph selector that sets the background color to orange, it will take precedence in the cascade. All of the paragraphs will appear with a green background. The font size will remain 24 pixels because the second paragraph selector didn’t identify a new font size.

Cascading Properties

The cascade also works with properties inside individual selectors. Again, for example, say we select all the paragraph elements and set their background color to orange. Then directly below the orange background property and value declaration, we add another property and value declaration setting the background color to green, as seen here.

1
2
3
4
5
p {
  background: orange;
  background: green;
}

Because the green background color declaration comes after the orange background color declaration, it will overrule the orange background, and, as before, our paragraphs will appear with a green background.

All styles will cascade from the top of our style sheet to the bottom of our style sheet. There are, however, times where the cascade doesn’t play so nicely. Those times occur when different types of selectors are used and the specificity of those selectors breaks the cascade. Let’s take a look.

Calculating Specificity

Every selector in CSS has a specificity weight. A selector’s specificity weight, along with its placement in the cascade, identifies how its styles will be rendered.

In Lesson 1, “Building Your First Web Page,” we talked about three different types of selectors: the type, class, and ID selectors. Each of these selectors has a different specificity weight.

The type selector has the lowest specificity weight and holds a point value of 0-0-1. The class selector has a medium specificity weight and holds a point value of 0-1-0. Lastly, the ID selector has a high specificity weight and holds a point value of 1-0-0. As we can see, specificity points are calculated using three columns. The first column counts ID selectors, the second column counts class selectors, and the third column counts type selectors.

What’s important to note here is that the ID selector has a higher specificity weight than the class selector, and the class selector has a higher specificity weight than the type selector.

Specificity Points

Specificity points are intentionally hyphenated, as their values are not computed from a base of 10. Class selectors do not hold a point value of 10, and ID selectors do not hold a point value of 100. Instead, these points should be read as 0-1-0 and 1-0-0 respectively. We’ll take a closer look at why these point values are hyphenated shortly, when we combine selectors.

The higher the specificity weight of a selector, the more superiority the selector is given when a styling conflict occurs. For example, if a paragraph element is selected using a type selector in one place and an ID selector in another, the ID selector will take precedence over the type selector regardless of where the ID selector appears in the cascade.

HTML
1
2
<p id="food">...</p>
CSS
1
2
3
4
5
6
7
#food {
  background: green;
}
p {
  background: orange;
}

Here we have a paragraph element with an id attribute value of food. Within our CSS, that paragraph is being selected by two different kinds of selectors: one type selector and one ID selector. Although the type selector comes after the ID selector in the cascade, the ID selector takes precedence over the type selector because it has a higher specificity weight; consequently the paragraph will appear with a green background.

The specificity weights of different types of selectors are incredibly important to remember. At times styles may not appear on elements as intended, and chances are the specificity weights of our selectors are breaking the cascade, therefore our styles are not appearing properly.

Understanding how the cascade and specificity work is a huge hurdle, and we’ll continue to cover this topic. For now, let’s look at how to be a little more particular and intentional with our selectors by combining them. Keep in mind that as we combine selectors, we’ll also be changing their specificity.

Combining Selectors

So far we’ve looked at how to use different types of selectors individually, but we also need to know how to use these selectors together. By combining selectors we can be more specific about which element or group of elements we’d like to select.

For example, say we want to select all paragraph elements that reside within an element with a class attribute value of hotdog and set their background color to brown. However, if one of those paragraphs happens to have the class attribute value of mustard, we want to set its background color to yellow. Our HTML and CSS may look like the following:

HTML
1
2
3
4
5
6
<div class="hotdog">
  <p>...</p>
  <p>...</p>
  <p class="mustard">...</p>
</div>
CSS
1
2
3
4
5
6
7
.hotdog p {
  background: brown;
}
.hotdog p.mustard {
  background: yellow;
}

When selectors are combined they should be read from right to left. The selector farthest to the right, directly before the opening curly bracket, is known as the key selector. The key selector identifies exactly which element the styles will be applied to. Any selector to the left of the key selector will serve as a prequalifier.

The first combined selector above, .hotdog p, includes two selectors: a class and a type selector. These two selectors are separated by a single space. The key selector is a type selector targeting paragraph elements. And because this type selector is prequalified with a class selector of hotdog, the full combined selector will only select paragraph elements that reside within an element with a class attribute value of hotdog.

The second selector above, .hotdog p.mustard, includes three selectors: two class selectors and one type selector. The only difference between the second selector and the first selector is the addition of the class selector of mustard to the end of the paragraph type selector. Because the new class selector, mustard, falls all the way to the right of the combined selector, it is the key selector, and all of the individual selectors coming before it are now prequalifiers.

Spaces Within Selectors

Within the previous combined selector, .hotdog p.mustard, there is a space between the hotdog class selector and the paragraph type selector but not between the paragraph type selector and the mustard class selector. The use, and omission, of spaces makes a large difference in selectors.

Since there isn’t a space between the paragraph type selector and the mustard class selector that means the selector will only select paragraph elements with the class of mustard. If the paragraph type selector was removed, and the mustard class selector had spaces on both sides of it, it would select any element with the class of mustard, not just paragraphs.

The best practice is to not prefix a class selector with a type selector. Generally we want to select any element with a given class, not just one type of element. And following this best practice, our new combined selector would be better as .hotdog .mustard.

Reading the combined selector from right to left, it is targeting paragraphs with a class attribute value of mustard that reside within an element with the class attribute value of hotdog.

Different types of selectors can be combined to target any given element on a page. As we continue to write different combined selectors, we’ll see their powers come to life. Before we do that, though, let’s take a look at how combining selectors changes a selector’s specificity weight.

Specificity Within Combined Selectors

When selectors are combined, so are the specificity weights of the individual selectors. These combined specificity weights can be calculated by counting each different type of selector within a combined selector.

Looking at our combined selectors from before, the first selector, .hotdog p, had both a class selector and a type selector. Knowing that the point value of a class selector is 0-1-0 and the point value of a type selector is 0-0-1, the total combined point value would be 0-1-1, found by adding up each kind of selector.

The second selector, .hotdog p.mustard, had two class selectors and one type selector. Combined, the selector has a specificity point value of 0-2-1. The 0 in the first column is for zero ID selectors, the 2 in the second column is for two class selectors, and the 1 in the last column is for one type selector.

Comparing the two selectors, the second selector, with its two classes, has a noticeably higher specificity weight and point value. As such it will take precedence within the cascade. If we were to flip the order of these selectors within our style sheet, placing the higher-weighted selector above the lower-weighted selector as shown here, the appearance of their styles would not be affected due to each selector’s specificity weight.

1
2
3
4
5
6
7
.hotdog p.mustard {
  background: yellow;
}
.hotdog p {
  background: brown;
}

In general we want to always keep an eye on the specificity weights of our selectors. The higher our specificity weights rise, the more likely our cascade is to break.

Layering Styles with Multiple Classes

One way to keep the specificity weights of our selectors low is to be as modular as possible, sharing similar styles from element to element. And one way to be as modular as possible is to layer on different styles by using multiple classes.

Elements within HTML can have more than one class attribute value so long as each value is space separated. With that, we can place certain styles on all elements of one sort while placing other styles only on specific elements of that sort.

We can tie styles we want to continually reuse to one class and layer on additional styles from another class.

Let’s take a look at buttons, for example. Say we want all of our buttons to have a font size of 16 pixels, but we want the background color of our buttons to vary depending on where the buttons are used. We can create a few classes and layer them on an element as necessary to apply the desired styles.

HTML
1
2
3
<a class="btn btn-danger">...</a>
<a class="btn btn-success">...</a>
CSS
1
2
3
4
5
6
7
8
9
10
.btn {
  font-size: 16px;
}
.btn-danger {
  background: red;
}
.btn-success {
  background: green;
}

Here you can see two anchor elements, both with multiple class attribute values. The first class, btn, is used to apply a font size of 16 pixels to each of the elements. Then, the first anchor element uses an additional class of btn-danger to apply a red background color while the second anchor element uses an additional class of btn-success to apply a green background color. Our styles here are clean and modular.

Using multiple classes, we can layer on as many styles as we wish, keeping our code lean and our specificity weights low. Much like understanding the cascade and calculating specificity, this is a practice that will take time to fully absorb, but we’ll get better with each lesson.

Common CSS Property Values

We’ve used a handful of common CSS property values already, such as the keyword color values of red and green. You may not have thought too much about them; that’s okay. We’re going to take time now to go over some previously used property values as well as to explore some of the more common property values that we’ll soon be using.

Specifically, we’ll look at property values that relate to colors and length measurements.

Colors

All color values within CSS are defined on an sRGB (or standard red, green, and blue) color space. Colors within this space are formed by mixing red, green, and blue color channels together, mirroring the way that televisions and monitors generate all the different colors they display. By mixing different levels of red, green, and blue, we can create millions of colors—and find nearly any color we’d like.

Currently there are four primary ways to represent sRGB colors within CSS: keywords, hexadecimal notation, and RGB and HSL values.

Keyword Colors

Keyword color values are names (such as red, green, or blue) that map to a given color. These keyword names and their corresponding colors are determined by the CSS specification. Most common colors, along with a few oddities, have keyword names.

A complete list of these keyword names can be found within the CSS specification.

Color Name Hex Values RGB Values HSL Values
black #000000 rgb(0, 0, 0) hsl(0, 0%, 0%)
silver #c0c0c0 rgb(192, 192, 192) hsl(0, 0%, 75%)
gray #808080 rgb(128, 128, 128) hsl(0, 0%, 50%)
white #ffffff rgb(255, 255, 255) hsl(0, 100%, 100%)
maroon #800000 rgb(128, 0, 0) hsl(0, 100%, 25%)
red #ff0000 rgb(255, 0, 0) hsl(0, 100%, 50%)
purple #800080 rgb(128, 0, 128) hsl(300, 100%, 25%)
fuchsia #ff00ff rgb(255, 0, 255) hsl(300, 100%, 50%)
green #008000 rgb(0, 128, 0) hsl(120, 100%, 25%)
olive #808000 rgb(0, 255, 0) hsl(120, 100%, 50%)
lime #00ff00 rgb(128, 128, 0) hsl(60, 100%, 25%)
yellow #ffff00 rgb(255, 255, 0) hsl(60, 100%, 50%)
navy #000080 rgb(0, 0, 128) hsl(240, 100%, 25%)
blue #0000ff rgb(0, 0, 255) hsl(240, 100%, 50%)
teal #008080 rgb(0, 128, 128) hsl(180, 100%, 25%)
aqua #00ffff rgb(0, 255, 255) hsl(180, 100%, 50%)

Here we are applying a maroon background to any element with the task class attribute value and a yellow background to any element with the count class attribute value.

1
2
3
4
5
6
7
.task {
  background: maroon;
}
.count {
  background: yellow;
}

While keyword color values are simple in nature, they provide limited options and thus are not the most popular color value choice.

Hexadecimal Colors

Hexadecimal color values consist of a pound, or hash, #, followed by a three- or six- character figure. The figures use the numbers 0 through 9 and the letters a through f, upper or lower case. These values map to the red, green, and blue color channels.

In six-character notation, the first two characters represent the red channel, the third and fourth characters represent the green channel, and the last two characters represent the blue channel. In three-character notation, the first character represents the red channel, the second character represents the green channel, and the last character represents the blue channel.

If in six-character notation the first two characters are a matching pair, the third and fourth characters are a matching pair, and the last two characters are a matching pair, the six-character figure may be shortened to a three-character figure. To do this the repeated character from each pair should be used once. For example, a shade of orange represented by the hexadecimal color #ff6600 could also be written as #f60.

Hexadecimal Color Syntax
Fig 3Six-character hexadecimal values may be written as three-character hexadecimal values when the red, green, and blue color channels each contain a repeating character

The character pairs are obtained by converting 0 through 255 into a base-16, or hexadecimal, format. The math is a little tricky—and worthy of its own book—but it helps to know that 0 equals black and f equals white.

The Millions of Hexadecimal Colors

There are millions of hexadecimal colors, over 16.7 million to be exact. Here’s how…

There are 16 options for every character in a hexadecimal color, 0 through 9 and a through f. With the characters grouped in pairs, there are 256 color options per pair (16 multiplied by 16, or 16 squared).

And with three groups of 256 color options we have a total of over 16.7 million colors (256 multiplied by 256 multiplied by 256, or 256 cubed).

To create the same maroon and yellow background colors from before, we could replace the keyword color values with hexadecimal color values, as seen here.

1
2
3
4
5
6
7
.task {
  background: #800000;
}
.count {
  background: #ff0;
}

Hexadecimal color values have been around for a while, and they have become fairly popular because they offer a large number of color options. They are, however, a little difficult to work with, especially if you’re not too familiar with them. Fortunately Adobe has created Adobe Kuler, a free application that provides a color wheel to help us find any color we want and its corresponding hexadecimal value.

Additionally, most image editing applications, such as Adobe Photoshop, provide the capability to locate hexadecimal color values.

Adobe Photoshop Color Picker
Fig 3The color picker tool within Adobe Photoshop displays the hexadecimal and RGB color values

RGB & RGBa Colors

RGB color values are stated using the rgb() function, which stands for red, green, and blue. The function accepts three comma-separated values, each of which is an integer from 0 to 255. A value of 0 would be pure black; a value of 255 would be pure white.

As we might expect, the first value within the rgb() function represents the red channel, the second value represents the green channel, and the third value represents the blue channel.

If we were to recreate the shade of orange from before as an RGB color value, it would be represented as rgb(255, 102, 0).

Also, using the same maroon and yellow background colors from before, we could replace the keyword or hexadecimal color values with RGB color values.

1
2
3
4
5
6
7
.task {
  background: rgb(128, 0, 0);
}
.count {
  background: rgb(255, 255, 0);
}

RGB color values may also include an alpha, or transparency, channel by using the rgba() function. The rgba() function requires a fourth value, which must be a number between 0 and 1, including decimals. A value of 0 creates a fully transparent color, meaning it would be invisible, and a value of 1 creates a fully opaque color. Any decimal value in between 0 and 1 would create a semi-transparent color.

If we wanted our shade of orange to appear 50% opaque, we would use an RGBa color value of rgba(255, 102, 0, .5).

We can also change the opacity of our maroon and yellow background colors. The following code sets the maroon background color to 25% opaque and leaves the yellow background color 100% opaque.

1
2
3
4
5
6
7
.task {
  background: rgba(128, 0, 0, .25);
}
.count {
  background: rgba(255, 255, 0, 1);
}

RGB color values are becoming more popular, especially due to the ability to create semi-transparent colors using RGBa.

HSL & HSLa Colors

HSL color values are stated using the hsl() function, which stands for hue, saturation, and lightness. Within the parentheses, the function accepts three comma-separated values, much like rgb().

The first value, the hue, is a unitless number from 0 to 360. The numbers 0 through 360 represent the color wheel, and the value identifies the degree of a color on the color wheel.

The second and third values, the saturation and lightness, are percentage values from 0 to 100%. The saturation value identifies how saturated with color the hue is, with 0 being grayscale and 100% being fully saturated. The lightness identifies how dark or light the hue value is, with 0 being completely black and 100% being completely white.

Returning to our shade of orange, as an HSL color value it would be written as hsl(24, 100%, 50%).

Our maroon and yellow background colors can also be stated as HSL color values, as shown here.

1
2
3
4
5
6
7
.task {
  background: hsl(0, 100%, 25%);
}
.count {
  background: hsl(60, 100%, 50%);
}

HSL color values, like RGBa, may also include an alpha, or transparency, channel with the use of the hsla() function. The behavior of the alpha channel is just like that of the rgba() function. A fourth value between 0 and 1, including decimals, must be added to the function to identify the degree of opacity.

Our shade of orange as an HSLa color set to 50% opaque would be represented as hsla(24, 100%, 50%, .5).

The same 25% opaque maroon background color and 100% opaque yellow background color from before would look like the following as HSLa color values.

1
2
3
4
5
6
7
.task {
  background: hsla(0, 100%, 25%, .25);
}
.count {
  background: hsla(60, 100%, 50%, 1);
}

The HSL color value is the newest color value available within CSS. Due to its age and support within browsers, though, it isn’t as widely used as the other values.

For the time being, hexadecimal color values remain the most popular as they are widely supported; though when an alpha channel for transparency is needed, RGBa color values are preferred. These preferences may change in the future, but for now we’ll use hexadecimal and RGBa color values.

Lengths

Length values within CSS are similar to colors in that there are a handful of different types of values for length, all of which serve distinct purposes. Length values come in two different forms, absolute and relative, each of which uses different units of measurement.

We’re going to stick to the more common—and more straightforward—values at the moment, as more complex values will provide much more power than we need for now.

Absolute Lengths

Absolute length values are the simplest length values, as they are fixed to a physical measurement, such as inches, centimeters, or millimeters. The most popular absolute unit of measurement is known as the pixel and is represented by the px unit notation.

Pixels

The pixel is equal to 1/96th of an inch; thus there are 96 pixels in an inch. The exact measurement of a pixel, however, may vary slightly between high-density and low-density viewing devices.

Pixels have been around for quite some time and are commonly used with a handful of different properties. The code here is using pixels to set the font size of all paragraphs to 14 pixels.

1
2
3
4
p {
  font-size: 14px;
}

With the changing landscape of viewing devices and their varying screen sizes, pixels have lost some of their popularity. As an absolute unit of measurement, they don’t provide too much flexibility. Pixels are, however, trustworthy and great for getting started. We’re going to lean on them quite a bit as we’re learning the ropes of HTML and CSS.

Relative Lengths

In addition to absolute length values, there are also relative length values. Relative length values are a little more complicated, as they are not fixed units of measurement; they rely on the length of another measurement.

Percentages

Percentages, represented by the % unit notation, are one of the most popular relative values. Percentage lengths are defined in relation to the length of another object. For example, to set the width of an element to 50%, we have to know the width of its parent element, the element it is nested within, and then identify 50% of the parent element’s width.

1
2
3
4
.col {
  width: 50%;
}

Here we’ve set the width of the element with the class attribute value of col to 50%. That 50% will be calculated relative to the width of the element’s parent.

Percentages are extremely helpful for setting the height and width of elements and building out a web page’s layout. We’re going to rely on them often to help us out in these areas.

Em

The em unit is also a very popular relative value. The em unit is represented by the em unit notation, and its length is calculated based on an element’s font size.

A single em unit is equivalent to an element’s font size. So, for example, if an element has a font size of 14 pixels and a width set to 5em, the width would equal 70 pixels (14 pixels multiplied by 5).

1
2
3
4
5
.banner {
  font-size: 14px;
  width: 5em;
}

When a font size is not explicitly stated for an element, the em unit will be relative to the font size of the closest parent element with a stated font size.

The em unit is often used for styling text, including font sizes, as well as spacing around text, including margins and paddings. We’ll explore text a bit more in Lesson 6, “Working with Typography.”

There are a lot more absolute and relative units of measurement than those mentioned here. However, these three—pixels, percentages, and em units—are the most popular and the ones we’re going to primarily use.

Summary

Sadly our Styles Conference website lay dormant this lesson. We focused on the foundations of CSS, covering exactly how it works and some common values we’re sure to use.

To briefly recap, within this lesson we’ve discussed the following:

  • How style sheets cascade from the top to the bottom of a file
  • What specificity is and how we can calculate it
  • How to combine selectors to target specific elements or groups of elements
  • How to use multiple classes on a single element to layer on different styles for more modular code
  • The different color values available to use within CSS, including keyword, hexadecimal, RGB, and HSL values
  • The different length values available to use within CSS, including pixels, percentages, and em units

We still have a lot to cover, but the fundamentals are starting to fall into place. Within the next few lessons we’ll continue to dive in to CSS, and our website will really begin to take shape.

20+ of the Best Website Home Page Design Examples

best homepage design




You never get a second chance to make a first impression — that’s why your home page is undoubtedly one of the most important web pages on your website. For any given company, the home page is its virtual front door. If a new visitor doesn’t like the home page they see, their knee-jerk reaction is to hit the “back” button.



That’s right — unfortunately, a lot of people still judge a book by its cover.

What makes a website’s homepage design brilliant instead of blah? Well, it takes more than looks alone — it also has to work well. That’s why the most brilliant homepages on this list don’t just score high in beauty, but also in brains.

Take a look at our free WordPress Tips and Tricks to create a professional home page

But before we dive into the examples, let’s dissect some of the best practices of homepage design.

All of the homepage designs shown here utilize a combination of the following elements.

Not every page is perfect, but the best homepage designs get many of these right:

1. The design clearly answers “Who I am,” “What I do,” and/or “What can you (the visitor) do here.”

If you’re a well-known brand or company (i.e., Coca-Cola) you may be able to get away with not having to describe who you are and what you do; but the reality is, most businesses still need to answer these questions so that each visitor knows they are in the “right place.”

Steven Krugg sums it up best in his best-selling book, Don’t Make Me Think: If visitors can’t identify what it is you do within seconds, they won’t stick around long.

2. The design resonates with the target audience.

A homepage needs to be narrowly focused — speaking to the right people in their language. The best homepages avoid “corporate gobbledygook,” and eliminate the fluff.

3. The design communicates a compelling value proposition.

When a visitor arrives on your home page, it needs to compel them to stick around. The homepage is the best place to nail your value proposition so that prospects choose to stay on your website and not navigate to your competitors’.

4. The design is optimized for multiple devices.

All the homepages listed here are highly usable, meaning they are easy to navigate and there aren’t “flashy” objects that get in the way of browsing, such as flash banners, animations, pop-ups, or overly-complicated and unnecessary elements. Many are also mobile-optimized, which is an incredibly important must-have in today’s mobile world.



5. The design includes calls-to-action (CTAs).

Every homepage listed here effectively uses primary and secondary calls-to-action to direct visitors to the next logical step. Examples include “Free Trial,” “Schedule a Demo,” “Buy Now,” or “Learn More.”

Remember, the goal of the homepage is to compel visitors to dig deeper into your website and move them further down the funnel. CTAs tell them what to do next so they don’t get overwhelmed or lost. More importantly, CTAs turn your home page into a sales or lead-generation engine, and not just brochure-wear.

6. The design is always changing.

The best homepages aren’t always static. Some of them are constantly changing to reflect the needs, problems, and questions of their visitors. Some homepages also change from A/B testing or dynamic content.

7. The design is effective.

A well-designed page is important to building trust, communicating value, and navigating visitors to the next step. As such, these homepages effectively use layout, CTA placement, whitespace, colors, fonts, and other supporting elements.

Now, get ready to learn about excellent homepage design through the following 16 real-life examples.

1. FreshBooks

freshbooks-homepage-update.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • It’s easy to consume. There is much debate on whether short or long homepages work better. If you choose to do the latter, you need to make it easy to scroll and read — and that’s exactly what this site does. It almost acts like a story.
  • There’s great use of contrast and positioning with the primary calls-to-action — it’s clear what the company wants you to convert on when you arrive.
  • The copy used in the calls-to-action “Get Started for Free” is very compelling.
  • FreshBooks uses customer testimonials on the homepage to tell real-world stories of why to use the product.
  • The sub-headline is also great: “Join over 10 million small business owners using FreshBooks.” FreshBooks expertly employs social proof — 10 million is a big number — to compel its target audience to join their peers and try the tool.

2. Airbnb

airbnb-homepage-update.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • It includes the destination and date search form that most visitors come looking for, right up front, guiding visitors to the logical next step.
  • The search form is “smart,” meaning it’ll auto-fill the user’s last search if they’re logged in.
  • The primary call-to-action (“Search”) contrasts with the background and stands out; but the secondary call-to-action for hosts is visible above the fold, too.
  • It offers suggestions for excursions and getaways Airbnb users can book on the same site as their lodgings to get visitors more excited about booking their trip on the site. It also shows which of these offerings are most popular among other users.

3. Mint

mint-homepage-update.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • It’s a super simple design with a strong, no-jargon headline and sub-headline.
  • The homepage gives off a secure but easy-going vibe, which is important for a product that handles financial information.
  • It also contains simple, direct, and compelling call-to-action copy: “Sign up free.” The CTA design is also brilliant — the secured lock icon hits home the safety message once again.

4. Dropbox (Business)

dropbox-business-homepage-update.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • Dropbox carries over its simple design and branding. It includes only what is important: A large, relevant image with supporting copy, and a “Try free for 30 days” call-to-action button
  • Dropbox’s homepage and website is the ultimate example of simplicity. It limits its use of copy and visuals and embraces whitespace.
  • Its sub-headline is simple, yet powerful: “The secure file sharing and storage solution that employees and IT admins trust.” No need to decode jargon to figure out what Dropbox really does.

5. 4 Rivers Smokehouse

4 rivers-homepage-update.png

Why It’s Brilliant

  • Drool. That’s what I think when I arrive at the website for 4 Rivers Smokehouse. Combined with great photography, the headline “Brisket. 18 years to master. Yours to savor.” sounds like an experience worth trying.
  • The parallax scrolling guides you on a tour through the services, menu, and people having a great time — a great use of this popular design trend.
  • The only negative? I don’t live close enough to this place. Boo.

6. Cobb Pediatric Therapy Services

cobb-pediatric-therapy-homepage-design.png



VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • The headline and sub-headline appeal to the visitors’ emotional side: “Work With a Company That Gets It”; “Trust us. We’ve been there too! We’ll find jobs where you can thrive.” That value proposition is unique and compelling.
  • It’s hard to tell from the screenshot above, but the headline is on a rotating carousel that caters to specific personas, from job applicants to people searching for a therapist for their schools.
  • There are several pathways visitors can take when they arrive on the page, but the calls-to-action are positioned well, worded simply, and contrast with the rest of the page.

7. Jill Konrath

jill-konrath-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • It’s simple and gets straight to the point. From the headline and sub-headline, it’s clear exactly what Jill Konrath does (and how she can help your business).
  • It also gives easy access to Jill’s thought leadership materials, which is important to establishing her credibility as a keynote speaker.
  • It’s easy to subscribe to the newsletter and get in touch — two of her primary calls-to-action.
  • The pop-up subscription CTA uses social proof to get you to join her thousands of other fans.
  • It includes news outlet logos and testimonials as social proof.

8. Evernote

Evernote-homepage-update.png

Why It’s Brilliant

  • Over the years, Evernote has turned from a simple note-saving app into a suite of business products. This isn’t always easy to convey on a homepage, but Evernote does a nice job packaging many potential messages into a few key benefits.
  • This homepage uses a combination of rich, muted colors in the video and its signature bright green and white highlights to make conversion paths stand out.
  • Following a simple headline (“Remember Everything”), the eye path then leads you to its call-to-action, “Sign Up For Free.”
  • Evernote also offers a one-click signup process through Google to help visitors save even more time.

9. Telerik by Progress

telerik-homepage-update.png

Why It’s Brilliant

  • “Stuffy enterprise” isn’t the feeling you get when you arrive at Telerik’s website. For a company that offers many technology products, its bold colors, fun designs, and videography give off a Google-like vibe. Just one important aspect to making visitors feel welcome and letting them know they’re dealing with real people.
  • I love the simple, high-level overview of its six product offers. It’s very clear way of communicating what the company does and how people can learn more.
  • The copy is lightweight and easy to read. It speaks the language of its customers.

10. eWedding

ewedding-homepage-update.png

Why It’s Brilliant

  • For those love birds planning their big day, eWedding is a great destination to building a custom wedding website. The homepage isn’t cluttered and only includes the necessary elements to get people to starting building their websites.
  • The sub-headline “Over 800,000 wedding websites built!” is great social proof.
  • It’s included excellent product visuals, a great headline, and a call-to-action that reduces friction with the copy, “Start website.”

11. Basecamp

basecamp-homepage-update.png

Why It’s Brilliant

  • For a long time, Basecamp has had brilliant homepages, and here you can see why. It often features awesome headlines and clever cartoons.
  • The call-to-action is bold and above the fold.
  • In this example, the company chose a more blog-like homepage (or single page site approach), which provides much more information on the product.
  • The customer quote is a bold and emphatic testimonial speaking to the benefits and results of using the product.

12. charity: water

charity water-homepage-update.png

Why It’s Brilliant

  • This isn’t your typical non-profit website. Lots of visuals, creative copy, and use of interactive web design make this stand out.
  • The animated header image is a great way to capture attention.
  • It employs great uses of video and photography, particularly in capturing emotion that causes action.

13. TechValidate

tech-validate-homepage-design.png

Why It’s Brilliant

  • This homepage is beautifully designed. I particularly love the use of whitespace, contrasting colors, and customer-centric design.
  • The headline is clear and compelling, as are the calls-to-action.
  • There’s also a great information hierarchy, making it easy to scan and understand the page quickly.

14. Chipotle

chipotle-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • The homepage is a great example of agility and constant change. Chipotle’s current homepage is all about the forthcoming holiday, which it uses as a unique value proposition to get you to start clicking through your site. When I think Chipotle, I don’t necessarily think about catering, but the site is a great reminder to consider different uses for the burritos you already know and love.
  • The food photography is detailed and beautiful, and it actually makes me hungry looking at it. Now that’s an effective use of visuals.

15. Medium

medium-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • This is perhaps one of the best uses of whitespace I’ve seen. It allows Medium’s app tagline and photo to take center stage while still drawing your eye to the darker section titles on the site.
  • Medium makes it easy to sign up — on the site, or with a simple text message to your mobile phone. I’m much more responsive to a text than an email, so this is a great strategy to keep people engaged in the signup process.
  • The homepage uses social proof to get visitors to start clicking around: The “Popular on Medium” and “Staff Picks” sections let me know where to find high-quality content.

16. Digiday

digiday-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • Unlike other online news publications that inundate homepages with as many headlines and images as possible, Digiday’s first section showcases just one article. Its featured image (in this case, a scary one) is eye-catching, and the headline is just asking to be clicked now that the visitor has an idea of what they’re going to read.
  • The top of the homepage, where websites normally showcase a ton of different sections and options to click through, only has one icon to click — which leads you to a subscription page.

17. KIND Snacks

kind-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • The bold colors produce contrast, making the words and images stand out on the page.
  • The CTA — “Shop KIND” — is clever. It urges the visitor to click to learn more while making a play on the word “kind” — implying that it’s a good choice to shop there.
  • KIND Snacks’ tagline is straight up brilliant — when I read it, the message immediately resonated and made me want to read the snack bar’s label.

18. Ahrefs

Ahrefs-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • The color contrast between the blue, white, and orange colors is eye-catching and makes the headline and CTA pop.
  • The sub-headline and CTA are a compelling pair: To be able to start tracking and outranking competitors for free is a great offer.
  • The homepage presents a multitude of options for the visitor, but it isn’t cluttered thanks to the solid background and simple typography.

19. A24 Films

a24-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • The film company’s homepage is made up of only trailers for its new films. We know video content is format audiences want to see more of, and this is a great strategy to showcase A24’s work in a highly engaging way.
  • At the top of the homepage, A24 immediately offers a myriad of ways to get in touch via social media and email — something I appreciate as a visitor when so many other sites bury contact information at the bottom of the page.

20. Ellevest

ellevest-homepage-design.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant

  • “Invest Like a Woman: Because money is power.” These headlines are powerful and make me want to learn more about the product — both as a woman, and as someone interested in making smart financial choices.
  • The images show, rather than tell, one of the company’s value propositions: a desktop site and mobile app that move with you.
  • “Get Started” is a great CTA — in fact, we use it ourselves here at HubSpot. When clicked, it takes visitors through a few simple steps to set up a profile and start investing.

21. HubSpot

hubspot-homepage-design-update.png

VIEW ENTIRE HOMEPAGE

Why It’s Brilliant (If We Do Say So Ourselves)

  • The LEGO characters catch your attention (because they’re cute), then they cleverly illustrate and reinforce the messaging in the headline and sub-headline.
  • It bears another eye-catching “Get Started” CTA — with bonus microcopy detailing our free versions users can choose to upgrade in the future.
  • Throughout the homepage, our bright blue and orange color themes keep returning to draw your eye to links and CTAs.

 

I hope you liked this article. Please share it. Thx.

50+ Most Wanted New WordPress Tips, Tricks and Hacks 2018 / 2019

the best wordpress tip and tricks




Ever wondered what WordPress tips, tricks, and hacks most popular WordPress sites are using? In this article, we will share some of the most wanted WordPress tips, tricks, and hacks that will help you use WordPress like a pro and boost your traffic to your blog or website.



 

1. Use a Custom Homepage

By default, WordPress shows your latest posts on the homepage of your website. You can change that and use any page as your site’s homepage.

First you need to create a new page in WordPress, and you can name this page home. Next, you will need to create another page and let’s call this page blog as you will use it to display your blog posts.

Now go to Settings » Reading page in your WordPress admin and under ‘Front page displays’ option and switch to ‘A static page’. After that you will be able to select the pages you just created as your home and blog pages.

Static Front Page

You can also create a custom homepage template to use for your home page. Simply create a new file on your computer using a plain text editor and add this code at the top of it.

1
<?php /* Template Name: Custom Homepage */ ?>

Save this file as custom-homepage.php on your desktop.

Next, you need to connect to your website using an FTP client and go to /wp-content/themes/your-current-theme/ folder. Now upload the file you created earlier to your theme folder.

Return back to the WordPress admin area and edit your home page. You will be able to select your custom homepage template under the page attributes metabox.

Custom home page template

For more details see our guide on how to create a custom page template in WordPress.

Now this page will be completely empty and it will not show anything at all. You can use custom HTML/CSS and WordPress template tags to build your own page layout. You can also use a page builder plugin to easily create one using drag and drop tools.

2. Install Google Analytics in WordPress

Google Analytics is one of the must have tools for WordPress site owners. It allows you to see where your users are coming from and what they are doing on your website.

The best way to install Google Analytics is by using the SEMrush plugin. You can insert Google Analytics code into your theme files, but this code will disappear when you update or switch your theme.

For detailed instructions see our step by step guide on how to install Google Analytics in WordPress.

3. Password Protect WordPress Admin Directory

WordPress admin directory is where you perform all administrative tasks on your website. It is already password protected as users are required to enter username and password before they can access the admin area.

However by adding another layer of authentication, you can make it difficult for hackers to gain access to your WordPress site.

Here is how to enable password protection for your WordPress admin directory.

Login to cPanel dashboard of your WordPress hosting account. Under the security section, you need to click on ‘Password Protect Directories’ icon.

Password protect directories

Next, you will be asked to select the directories you want to protect. Select /wp-admin/ folder and next create a username and password.

Security settings

That is it. Now when you try to access your wp-admin directory, you should see an authentication required box like this:

Password protected directory

For alternate method and more detailed instructions see our guide on how to password protect your WordPress admin directory.

4. Show Images in Rows and Columns

Display photos in rows and columns

By default, when you add multiple images to a WordPress post, they would appear right next to each other or on top of each other. This does not look very good because your users will have to scroll a lot to see all of them.

This can be solved by displaying thumbnail images in a grid layout. This gives your website a more compact look and improves user experience.

For complete step by step instructions, see our guide on how to display WordPress photos in rows and columns.

5. Allow users to Subscribe to Comments

Comment subscription checkbox

Normally when users leave a comment on your website, they will have to manually visit the same article again to see if you or other users replied to comments.

Wouldn’t it be better if users were able to get email notifications about new comments on your posts? Here is how to add this feature to your website.

Simply install and activate the Subscribe to Comments Reloaded plugin. Upon activation, you need to visit Settings » Subscribe to Comments to configure the plugin settings.

For detailed instructions see our guide on how to allow users to subscribe to comments in WordPress.

6. Limit login attempts

Locked out login

By default, a WordPress user can make unlimited number of attempts to login to a WordPress site. This allows anyone to try guessing your password until they get it right.

To control this, you need to install and activate the Login LockDown plugin. It allows you to set limits on the number of failed attempts a user can make to login.

For detailed setup instructions see our guide on how to limit login attempts in WordPress.

7. Display Excerpt (Post Summary) on Home and Archive Pages

Post excerpts

You may have noticed that all popular blogs show article summary instead of full article on their home and archive pages. It makes those pages load faster, increases page views, and avoids duplicate content across your website.

For more on this topic, see our article on excerpt (summary) vs full posts in WordPress archive pages.

Many premium and free WordPress themes already use excerpts on home and archive pages. However, if your theme doesn’t display excerpts, then see our guide on how to display post excerpts in WordPress themes.

8. Add Custom Default Gravatar Image

WordPress uses Gravatar to display user profile photos in WordPress. If a user does not have a gravatar, then WordPress uses a default image which is called ‘Mystery Person’.

This default gravatar image will appear many times in your WordPress comments area simply because a lot of users do not have a gravatar image associated with their email address.

You can easily replace this default gravatar with your own custom default gravatar image.

First you will need to upload the image you want to use as your default gravatar image to your WordPress media library.

Next, you need to copy the image file URL.

Copy file URL

Now you need to add the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
4
5
6
add_filter( 'avatar_defaults', 'wpb_new_gravatar' );
function wpb_new_gravatar ($avatar_defaults) {
$myavatar = 'http://example.com/wp-content/uploads/2017/01/wpb-default-gravatar.png';
$avatar_defaults[$myavatar] = "Default Gravatar";
return $avatar_defaults;
}

Don’t forget to replace $myavatar value with the URL of the custom gravatar image you uploaded earlier.

You can now visit Settings » Discussion page, and you will notice your custom default avatar added to default avatar choices.

For detailed instructions check out our tutorial on how to add change the default gravatar in WordPress.

9. Adding custom CSS to a WordPress Theme

As a WordPress site owner, sometimes you may need to add custom CSS to your site. CSS allows you to change the appearance of things on your WordPress site like colors, margins, font sizes, etc.

The easiest way to add custom CSS to any WordPress theme is by visiting the Appearance » Customize page in your WordPress admin. This will launch the WordPress theme customizer, and you will see your website’s preview in the right panel.

Now click on the ‘Additional CSS’ menu in the left panel to expand it.



Additional CSS in theme customizer

You will see a plain text box where you can add your custom CSS. As soon as you add a valid CSS rule, you will be able to see it applied on your website’s live preview pane.

Custom CSS code and preview

Don’t forget to click on the ‘Save & Publish’ button on the top when you are finished.

For alternate methods and more detailed instructions check out our beginner’s guide on how to add custom CSS in WordPress.

10. Using Inspect Element Tool to Customize WordPress

Adding custom CSS sounds great, but how do you know which CSS classes to edit? How do you debug it without actually having to write CSS?

Using Inspect Element tool, you can edit HTML, CSS, or JavaScript code for any webpage and see your changes live (only on your computer).

For a DIY website owner, these tools can help you preview how a site design would look without actually making the changes for everyone.

Simply point and right click on any element on a page, then select ‘Inspect’ from your browser’s menu.

Opening Inspect Element or developer tools in your browser

This will split your browser window, and you will be able to see the HTML and CSS source code of the page.

HTML and CSS panels in Inspect tool

Any changes you make here will be immediately visible on the page above. However, keep in mind that these changes are only happening in your browser and you are not actually editing the page.

This allows you to figure out what you need to edit and how. After that you can go ahead and change your actual theme files or custom CSS code.

For more on this topic, see our article on basics of Inspect element and customizing WordPress as DIY user.

11. Add a Facebook Thumbnail Image

Facebook can automatically pick up an image from your articles when they are shared by you or anyone else. Usually it picks the featured image of an article. However, sometimes it may pick a random image from the article that may not be suitable.

If you are using Yoast SEO plugin, then you can select a Facebook thumbnail image in Yoast SEO metabox on the post edit screen.

Selecting a Facebook thumbnail image for an article in Yoast SEO

You can also select a Facebook thumbnail image for your homepage by visiting SEO » Social page.

Setting a Facebook thumbnail for home page

If you are not using Yoast SEO plugin, then see our guide on how to fix Facebook incorrect thumbnail issue in WordPress.

12. Add Featured Image or Post Thumbnail to RSS Feed

WordPress RSS feeds shows a list of your most recent articles. If you are showing full articles in the feed, then all images inside will be displayed. However, it does not include the featured image or post thumbnail in the article.

To fix this, you can add the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
4
5
6
7
8
9
10
function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID) .
'</p>' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');

For more information, see our tutorial on how to add post thumbnail to RSS feeds in WordPress.

13. Show Excerpts in RSS Feed

By default, WordPress shows your full article in the RSS feed. This allows content scrapers to automatically fetch and steal your full articles. It also prevents your RSS feed subscribers from visiting your website.

To fix this, head over to Settings » Reading page and scroll down to ‘For each article in a feed, show’ option. Select summary and then click on the save changes button.

14. Use Shortcodes inside Text Widgets

Shortcodes allow you to easily add small functions into WordPress posts and pages. However, they do not work in the text widget.

To run shortcodes in your sidebar text widgets, you need to add this code to your theme’s functions.php file or a site-specific plugin.

1
add_filter('widget_text', 'do_shortcode');

You can also use the Shortcode Widget plugin, which adds a shortcode enabled text widget to your WordPress site.

For more information, take a look at our guide on how to add shortcodes in WordPress sidebar widgets.

15. Add Images in WordPress Sidebar

WordPress does not come with an easy way to just upload and display images in your sidebar (though it is expected to change soon in an upcoming version). At the moment if you want to add an image, then you need to add the HTML code for it.

First, you need to upload the image to your WordPress site using the media uploader and copy its URL.

Next, go to Appearance » Widgets page and add a text widget to your sidebar. Inside the text widget you will need to add the HTML in the following format.

<img src="Paste image URL here" alt="Alternate text" />

You can now save your widget settings and preview your website.

For more details see our guide on how to add an image in WordPress sidebar widget.

16. Add Content to Articles in RSS Feeds

Want to manipulate your WordPress RSS feeds by adding content to your articles visible only for your RSS feed subscribers?

Add the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
4
5
6
7
8
function wpbeginner_postrss($content) {
if(is_feed()){
$content = 'This post was written by Syed Balkhi '.$content.'Check out WPBeginner';
}
return $content;
}
add_filter('the_excerpt_rss', 'wpbeginner_postrss');
add_filter('the_content', 'wpbeginner_postrss');

This code shows the text ‘This post was written by Syed Balkhi’ before an article and ‘Check out WPBeginner’ after the article.

For more ways to manipulate RSS feed content, see our guide on how to add content in your WordPress RSS feeds.

17. Delay Posts in RSS Feeds

Have you ever published an article accidentally before it was ready to go live? We have all been there. You can easily just unpublish the article and continue editing it.

However, RSS feed readers and email subscribers may already get it in their inbox. There is an easy fix to avoid this -delaying posts from appearing in your RSS feed.

Add the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function publish_later_on_feed($where) {
    global $wpdb;
    if ( is_feed() ) {
        // timestamp in WP-format
        $now = gmdate('Y-m-d H:i:s');
        // value for wait; + device
        $wait = '10'; // integer
        // http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
        $device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
        // add SQL-sytax to default $where
        $where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
    }
    return $where;
}
add_filter('posts_where', 'publish_later_on_feed');

This code delays your published posts from appearing in RSS feed for 10 minutes.

For more details see our article on how to delay posts from appearing in WordPress RSS feed.

18. Display Random Header Images in WordPress

Want to display random header images on your WordPress site? Most WordPress themes come with built-in support to display header image across your website. However, you can also upload multiple header images and allow your theme to randomly display a header image.

Head over to Appearance » Customize page and then click on the ‘Header’ Section to expand it. Now upload all the header images that you want to use and then click on the ‘Randomize header images’ button.

Randomize header images in WordPress

If you want to display select few images on different articles and pages, then check out our guide on how to add random header images to your WordPress site.

19. Add Image Icons to Links Navigation Menu

Adding menu icons

Do you want to display image icons next to links in your navigation menu? The easiest solution is to use the Menu Image plugin.

After installing the plugin, simply head over to Appearance » Menu, and you will see the option to add images with each item in your existing menu.

If for some reason, you don’t want to use a plugin and would rather do it manually, then follow the steps below:

First you need to visit Appearance » Menus page and then click on the Screen Options button at the top right corner of the screen.

Enable CSS classes option for Navigation Menus

This will bring down a menu where you need to check the box next to CSS classes option.

After that scroll down to your navigation menu and click on an item to expand it. You will see an option to add CSS classes. Enter a different CSS class for each menu item.

Adding a CSS class to a menu item in WordPress

Don’t forget to click on the save menu button to store your changes.

Next, you need to upload the image icons to your WordPress site by visiting Media » Add Media page. After uploading the image files copy their URLs as you will need them in the next step.

Now you can add an image icon to your navigation menu by adding custom CSS. Here is a sample CSS that you can use as an starting point.

1
2
3
4
5
6
.homepage {
background-image: url('http://www.example.com/wp-content/uploads/2014/12/home.png');
background-repeat: no-repeat;
background-position: left;
padding-left: 5px;
}

Don’t forget to replace image URL with your own image file URL.

20. Open Navigation Menu Link in New Window

Sometimes you may need to make a navigation menu link open in a new window. The problem is you do not see an option to do that when adding menu items.

Actually, the option is hidden to remove clutter from the screen. You will need to click on the screen options button at the top right corner of the screen and check the ‘link target’ option.

Link target option in navigation menu screen

Next, you need to scroll down to the menu item that you want to open in a new window. Click on the menu item to expand it, and you will see the option to open link in a new tab.

Open link in a new tab or window

Don’t forget to click on the save menu button to store your changes.

21. Add Full Screen Search Overlay in WordPress

Full screen search overlay on a WordPress site

If you click on the search icon at the top right corner of any page on WPBeginner, then you will notice a full screen search overlay appear. It improves search experience and makes it more engaging.

You can add this to your WordPress site as well. The easiest way to do this is by installing and activating the WordPress Full Screen Search Overlay plugin.

The plugin works out of the box and there are no settings for you to configure. Upon activation, it turns any default WordPress search form field into a full screen search overlay.

For more details, see our guide on how to add a full screen search overlay in WordPress.

22. Add a Sticky Floating Navigation Menu

A sticky floating navigation menu stays on top of the screen as a user scrolls down. Some WordPress themes have this feature as an option in their settings. If your theme doesn’t have this option, then you can try this method.

First, you need to install and activate the Sticky Menu (or Anything!) on Scroll plugin.

Upon activation, go to plugin’s settings page located under Settings » Sticky Menu (or Anything!). Add the CSS class of your navigation menu and save changes.

For detailed instructions, see our tutorial on how to create a sticky floating navigation menu in WordPress.

23. Add multiple authors to a WordPress post

Do you want to credit multiple authors for an article on your website? By default, WordPress posts are assigned to a single author. However, if you often need to credit multiple authors, then there is an easier way to to do this.

You will need to install and activate the Co-Authors Plus plugin.

Now go ahead and edit the post or page where you want to credit multiple authors. On the post edit screen, you will notice the new ‘Authors’ box just below the post editor where you can credit multiple authors.

Select multiple authors

24. Add Categories to WordPress Pages

Want to add categories and tags to pages in WordPress? By default, they are only available for posts. Mainly, because pages are supposed to be static standalone content (see difference between posts and pages in WordPress).

If you want to add categories and tags, then simply add this code to your theme’s functions.php file or a site-specific plugin.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// add tag and category support to pages
function tags_categories_support_all() {
  register_taxonomy_for_object_type('post_tag', 'page');
  register_taxonomy_for_object_type('category', 'page'); 
}
// ensure all tags and categories are included in queries
function tags_categories_support_query($wp_query) {
  if ($wp_query->get('tag')) $wp_query->set('post_type', 'any');
  if ($wp_query->get('category_name')) $wp_query->set('post_type', 'any');
}
// tag and category hooks
add_action('init', 'tags_categories_support_all');
add_action('pre_get_posts', 'tags_categories_support_query');

25. Create a Local WordPress Site on Your Computer

Many WordPress site owners and developers install WordPress on their computer. It allows you to develop a WordPress site locally, try plugins and themes, and learn WordPress basics.

We created detailed step by step instructions on how to install WordPress on your Windows computer or on Mac using MAMP.

26. Display Total Number of Comments in WordPress

Comments provide an easier way for users to engage with content on your website. Showing total number of comments can be used as social proof and encourage more users to participate in discussions.

The easiest way to do this is by installing the Simple Blog Stats plugin. Upon activation, you can add [sbs_apoproved] shortcode to any post or page to display total number of comments.

For a code method and more instructions see our article on how to display total number of comments in WordPress.

27. Show Total Number of Registered Users in WordPress

User count preview in WordPress

If you allow users to register on your WordPress site, then showing total number of registered users can encourage more users to signup.

The easiest way to do this is by installing the Simple Blog Stats plugin. Upon activation, you can add [sbs_users] shortcode to any post or page to display total number of registered users.

For more detailed instructions, see our tutorial on how to show total number of registered users in WordPress.

28. Create New Image Sizes in WordPress

When you upload an image to your blog, WordPress automatically creates several copies of the image. Your WordPress theme and plugins can also add new image sizes.

To create new image sizes in WordPress, you need to add the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
add_image_size( 'sidebar-thumb', 120, 120, true ); // Hard Crop Mode
add_image_size( 'homepage-thumb', 220, 180 ); // Soft Crop Mode
add_image_size( 'singlepost-thumb', 590, 9999 ); // Unlimited Height Mode

This code adds three new image sizes. Don’t forget to change image size names and dimensions to your own requirements.

For more information, see our tutorial on how to create new image sizes in WordPress.

29. Add Category Icons in WordPress

Want to add category icons or images next to category names in WordPress? It makes your category archive pages look more engaging and improves user experience.

First you need to install and activate the Taxonomy Images plugin in WordPress. Upon activation, head over to Posts » Categories and click on the add button next to blank thumbnail icon for each category.

Add category images in WordPress

For detailed instructions, see our guide on how to add taxonomy images (category icons) in WordPress.

30. Convert Categories to Tags or Vice versa

Often folks are not clear about how to properly use categories and tags in WordPress. Sometimes you may end up creating categories which should have been tags or vice versa.

It is easily fixable.

Head over to Tools » Import page and then install Categories and Tags Converter.

Install categories and tags converter in WordPress

After installation, click on the run importer link to continue.

On the converter page, you can switch between categories to tags or tags to categories converter. Next, select the items you want to convert and then click on the convert button.

Convert button

31. Bulk Move Posts Between Categories and Tags

Sometimes you may want to bulk move posts between categories and tags. Doing that one by one for each post can be time consuming.

Actually, there is a plugin for that. Simply install and activate the Bulk Move plugin. Upon activation, you need to go to Tools » Bulk Move to move your posts.

Moving posts between categories and categories

For more detailed instructions, visit our tutorial on how to bulk move posts to categories and tags in WordPress.

32. Display Last Updated Date of Your Posts

Last updated date for posts in WordPress

By default, most WordPress themes will show the date when an article was published. This is fine, and would work for most websites and blogs.

However, if you regularly update your old content, then you may want to show your users when an article was last updated. Otherwise you users wouldn’t notice that the article contains current information.

This can be achieved by adding the following code to

1
2
3
4
5
6
7
8
9
10
11
12
13
function wpb_last_updated_date( $content ) {
$u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 86400) {
$updated_date = get_the_modified_time('F jS, Y');
$updated_time = get_the_modified_time('h:i a');
$custom_content .= '<p class="last-updated">Last updated on '. $updated_date . ' at '. $updated_time .'</p>'
}
    $custom_content .= $content;
    return $custom_content;
}
add_filter( 'the_content', 'wpb_last_updated_date' );

For more detailed instructions see our guide on how to display last updated date in WordPress.

33. How to Display Relative Dates in WordPress

Want to display relative dates like yesterday, 10 hours ago, or a week ago for your posts in WordPress? Relative dates give users a sense of how much time has passed since something was posted.

To add relative dates, you need to install and activate the Meks Time Ago plugin. Upon activation, you need to visit Settings » General page and scroll down to ‘Meks Time Ago Options’ section.

Meks Time Ago plugin settings

You can select when to use time ago and how to display it. Don’t forget to click on the save changes button to store your settings.

For more details, see our guide on how to display relative dates in WordPress.

34. Remove WordPress Version Number

By default WordPress adds the WordPress version in your website’s header. Some people think it’s a security liability to which our answer is to keep WordPress updated.

However if you want to remove the WordPress version number, simply add the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
4
function wpbeginner_remove_version() {
return '';
}
add_filter('the_generator', 'wpbeginner_remove_version');

For more information on this topic see our article on the right way to remove WordPress version number.

35. Update WordPress URLs when Not Able to Access WP-Admin

WordPress Site Address

Sometimes when moving a WordPress site to new domain or due to a misconfiguration you may need to update WordPress URLs.

These URLs tell WordPress where to display your site and where WordPress core files are located. Incorrect settings can lock you out of WordPress admin area or redirect you to the old website.

The easiest way to update WordPress URLs is by adding this code to your current theme’s functions.php file.

1
2
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );

Don’t forget to replace example.com with your own domain name. Once you access your WordPress site go to Settings » General page and update the URLs there. After that you need to remove the code you added to the functions file.

If you also need to update URLs in your posts and pages, then see our guide on how to properly update URLs when moving your WordPress site.

36. Deactivate All Plugins when not able to access WP-admin

When troubleshooting WordPress errors, you will be often asked to deactivate all WordPress plugins. You can just go to Plugins page and deactivate all plugins. But what if you are locked out of your WordPress site?

Here is how you can easily deactivate plugins when locked out of admin area.

First connect to your WordPress site using an FTP client and go to /wp-content/ folder. Inside it, you will find the plugins folder.

Renaming plugins folder to deactivate all WordPress plugins

Now you just need to rename the plugins folder to plugins.old and WordPress will automatically deactivate all plugins.

For alternate method and more information see our guide on how to deactivate all plugins when not able to access wp-admin.

37. Remove Default Image Links in WordPress

By default, when you upload images using the media uploader, WordPress asks you select how you would like to link to an image. If you don’t want to link to an image, then you can select None.

A better way to deal with this is by adding the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
4
5
6
7
8
function wpb_imagelink_setup() {
    $image_set = get_option( 'image_default_link_type' );
    
    if ($image_set !== 'none') {
        update_option('image_default_link_type', 'none');
    }
}
add_action('admin_init', 'wpb_imagelink_setup', 10);

This code automatically sets default image linking option to none.

For more on this topic check out our guide on how to automatically remove default image link in WordPress.

38. Include Category in Post URLs

You may have noticed that many WordPress sites use category in their post URLs. This allows them to add more useful information into a URL which is good for user experience as well as SEO.

If you want to add category name into your WordPress post URLs, then head over to Settings » Permalinks page. Click on the custom structure and add /%category%/%postname%/ in the field next to it.

Adding category to WordPress post URLs

Don’t forget to click on the save changes button to store your settings.

To learn more on how WordPress will handle subcategories and multiple categories, see our guide on how to include category and subcategories in WordPress URLs.

39. Display Random Posts in WordPress

Want to display random posts in your WordPress sidebar? Random posts give your users a chance to discover articles that they would otherwise never get to see.

First, you need to install and activate the Advanced Random Posts Widget plugin. Upon activation, head over to Appearance » Widgets page and then add Random Posts widget to a sidebar.

For an alternate code method, see our guide on how to display random posts in WordPress.

40. Allow user registration on your WordPress Site

WordPress comes with a powerful user management system with different roles and capabilities. If you want to allow users to register on your site, here is how you would turn on that feature.

Head over to Settings » General page and click on the check box next to ‘membership’ option. Below that you need to choose the default role that will be assigned to new users, if you are unsure, then use subscriber.

For more details see our guide on how to allow user registration on your WordPress site.

41. Create a Custom User Registration Form in WordPress

When you open user registration on your site, users will be using the default WordPress registration form. You can replace it with a custom user registration form for an improved user experience.

First you will need to install and activate the WPForms plugin. You will need at least the Pro plan to get access to their user registration addon.

Upon activation, go to WPForms » Addons page to install and activate the user registration addon.

After that you need to create a new form by visiting WPForms » Add New page. This will launch the WPForms builder where you need to select the User Registration Form as your template.

After creating your form you need to click on the embed button to copy the embed code. Now you can add this code to any WordPress post or page to display your custom user registration form.

For more detailed instructions see our guide on how to create a custom user registration form in WordPress.

42. Exclude Specific Categories from RSS Feed

Sometimes you may need to exclude specific categories from your WordPress RSS feed. The easiest way to do that is by installing and activating the Ultimate Category Excluder plugin.

Upon activation, head over to Settings » Category Exclusion page to configure plugin settings.

Category excluder

Select the categories you want to exclude and then click on the save changes button to store your settings.

43. Change Excerpt Length in WordPress

The default WordPress excerpt length is often too short to describe a post’s summary. To change excerpt length you can add the following code to your theme’s functions.php file or a site-specific plugin.

1
2
3
4
5
6
7
8
9
10
11
// Changing excerpt length
function new_excerpt_length($length) {
return 100;
}
add_filter('excerpt_length', 'new_excerpt_length');
// Changing excerpt more
function new_excerpt_more($more) {
return '...';
}
add_filter('excerpt_more', 'new_excerpt_more');

If you do not want to mess with code, then see our guide on how to customize WordPress excerpts (no coding required).

44. Display Dynamic Copyright Date in WordPress

To add a copyright date to your WordPress site’s footer, you can just edit the footer template in your theme and add a copyright notice. However, the year you use in the code will need to be manually updated next year.

Instead, you can use the following code to dynamically display the current year in your copyright notice.

1
&copy; 2009 – <?php echo date('Y'); ?> YourSite.com

For more advance solution, check out our article on how to add dynamic copyright date in WordPress.

45. How to Change a User Name in WordPress

WordPress allows you to easily change the name of a user, but you cannot change the username. There are two ways of doing this.

The easiest way is by using a plugin called Username Changer. After activating the plugin, go to Users » Username Changer page in your WordPress admin.

Changing a username in WordPress with Username Changer plugin

Select the username you want to change, and then enter the new username.

For alternate methods, see our article on how to change your WordPress username.

46. Allow Users to Like or Dislike Comments

WordPress comment with like dislike buttons

Have you seen how many popular sites like YouTube allow users to like and dislike comments. This brings more user engagement to the discussion on your website.

First you need to install and activate the Comments Like Dislike plugin.

Upon activation, you need to visit Comments » Comments Like Dislike page to configure plugin settings.

Like Dislike Comments

For more details, see our guide on how to allow users to like or dislike comments in WordPress.

47. Duplicate a WordPress Post or Page

The manual way to do duplicate a post is by creating a new post or page and then copying the content from the old one. However, this wouldn’t copy the post settings like categories, featured image, tags, etc.

The more efficient way to do this is by using the Duplicate Post plugin. Simply install and activate the plugin and then go to Posts » All Posts page.

Cone or draft a WordPress post

You will see the option to clone a post or create a new draft.

For more detailed instructions, see our article on how to easily duplicate posts and pages in WordPress with a single click.

48. Allow Users to Submit Posts to Your WordPress Site

Authors on your WordPress site can just login to their account and write posts. But what if you wanted your users to be able to submit posts directly without creating an account?

The best way to do this by creating a blog post submission form.

You will need to install and activate the WPForms plugin. You will need the pro version of the plugin to access the post submission addon.

Upon activation, go to WPForms » Addons page to download and activate the post submissions addon.

After that you can go to WPForms » Add New page and then select ‘Blog post submission form’ as your template.

Blog post submission form

Once you are done editing the form click on the embed button to copy the form embed code. Now you can paste this code in any WordPress post or page to display a blog post submission form.

Posts submitted by users will be stored in your WordPress posts as pending review. You can then review, edit and publish them.

For more detailed instructions, take a look at our guide on how to allow users to submit posts to your WordPress site.

49. Turn Off Comment Notification Emails in WordPress

WordPress automatically sends email notifications when someone leaves a comment or when a comment is awaiting moderation. This is exciting when you first start your blog, but it becomes very annoying after a short while.

The good news is that you can easily turn these notifications off. Visit the Settings » Discussion page on your WordPress admin and then scroll down to ‘Email Me Whenever’ section. Uncheck both options and then click on the save changes button.

Turn off comment notification emails

50. Change Sender Name in Outgoing WordPress Emails

By default, when WordPress sends an email notification it uses ‘WordPress’ as the sender name. This looks a bit unprofessional and you may want to change it to a real person or your website title.

You can easily change that by adding this code to your theme’s functions file or a site-specific plugin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Function to change email address
function wpb_sender_email( $original_email_address ) {
    return 'tim.smith@example.com';
}
// Function to change sender name
function wpb_sender_name( $original_email_from ) {
    return 'Tim Smith';
}
// Hooking up our functions to WordPress filters
add_filter( 'wp_mail_from', 'wpb_sender_email' );
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );

If you would rather do it using a plugin, then see our guide on how to change sender name in outgoing WordPress emails.

51. Changing the Author of a WordPress Post

Want to change the author of a WordPress post? By default, the option to change post author is hidden on the post edit screen.

You will need to edit the post where you want to change the author name and then click on Screen Options button at the top right corner of the screen. Check the box next to author option.

Enable author box

This will display the author meta box on the post edit screen where you can select a different author for the post.

For more details, check out our article on how to change the author of a post in WordPress.

52. Rearrange Post Edit Screen in WordPress

Sometimes you may feel that categories are located too far down on the post edit screen, or featured image box should be higher.

Many users don’t notice it for a while but all the boxes on the post edit screen are quite flexible. You can click to collapse them and even drag and drop them to arrange the post edit screen.

Rearrange post edit screen in WordPress

To learn more, see our tutorial on how to rearrange post edit screen in WordPress.

53. Change Number of Posts Shown on Blog Pages

By default, WordPress shows 10 posts on your blog pages and archives. You can change that to any number you want.

You will need to visit Settings » Reading page and then scroll down to ‘Blog pages show at most’ option. Enter the number of posts you want to display and then click on the save changes button.

Change number of posts

54. Automatically Close Comments on Old Articles

Sometimes you would notice that some very old posts on your site start getting regular spam comments for no apparent reason. One way to deal with this is by closing comments on older articles.

WordPress allows you to automatically turn off comments on old articles. You need to visit Settings » Discussion page and then scroll down to ‘Other comment settings’ section.

Disable comments on old posts

To learn how to deal with spam comments, see these tips to combat comment spam in WordPress.

55. Split Long Posts into Pages

Want to split lengthy posts into pages so that users can easily navigate them without scrolling too much? WordPress makes it super easy, just add the follow code where you want to split a post into next page.

<!––nextpage––>

WordPress will add page break at this point and rest of the post will appear on the next page. You can add the same code again when you want to start another page, and so on.

For more detailed instructions see our guide on how to split WordPress posts into multiple pages.

That’s all for now.

We hope this article helped you find some new WordPress tips, tricks, and hacks. You may also want to see our ultimate guide to boost WordPress speed and performance.

10 Questions to Ask When Hiring a Webmaster





Webmasters for small businesses often do it all, from designing the website to search engine optimization (SEO) to daily maintenance. So, you need an adept, creative multitasker whom you can trust with the keys to your website — the online gateway to your brand.



How can you find someone who’s up to that tall task? Here are 10 important questions to ask potential webmasters to try to ensure you’re hiring the right one:

1. Where can I find current and past examples of your work? Experienced candidates should readily share links to examples of their work that clearly demonstrate their capabilities, says Jason Hong, associate professor at Carnegie Mellon University’s School of Computer Science and chief technical officer of Wombat Security Technologies, a Pittsburgh-based cyber security training company. “Carefully examining their portfolio and work samples can help you assess their overall style and skills,” he says. Their work samples also can be a jumping off point to discuss their more technical skills, including HTML5, UNIX, JavaScript and database management.

2. May I have a list of your current and past clients? Candidates should readily provide contact information for existing and past clients, says Chris Turzo, managing director of Goodwyn, Powell & Turzo, an executive recruiting firm that specializes in IT and clean technology. “Directly speaking with people a candidate has worked for is an essential step in the hiring process because it helps you establish how reliable and results-driven” he or she is. Many contract webmasters work independently on their own time schedules, he adds, so ask if they work well without a lot of structure and still deliver desired results on time.



 

3. What’s your favorite website and why do you like it? The answer can reveal a lot about a webmaster’s sense of branding, design, user interaction and more, Turzo says.

4. Which publishing, design and content technologies would you use to build and maintain my website? Webmasters should be able to describe the major publishing, design and content scheduling tools, give the pros and cons of each, and explain which they would suggest for you based on your budget and scope of work. “For instance, if they incorporate a blog within your website, would they use WordPress or Drupal, or would they code one from scratch?” says Malcolm Ong, co-founder and chief technical officer at Skillshare, an online education community based in New York City, and a mentor at 500 Startups, a Mountain View, Calif. internet seed fund and startup accelerator. “If you’re not tech-savvy, you may not fully understand all of the technologies he or she proposes, but they should at least be able to present you with clear options that you can generally understand.”

5. How will you optimize my website for search engines? Lisa Lopuck, author of Web Design for Dummies (Wiley, 3rd edition, 2012), suggests asking candidates how knowledgeable they are about SEO tools and techniques. “Ask them to explain which strategies and methods they’ll use to boost your rankings in all of the major search engines,” she says. They should also be experienced with Google Analytics to track website traffic and user behavior statistics and gauge the effectiveness of their SEO campaigns.



6. What kind of special features can you integrate into my site? A static website simply won’t do. Customers have come to expect extras features like video, social media feeds and banner ads. Be sure the candidate has the skills and resources to provide them. Can they easily add a contact form, blog, Flash animation, and Facebook and Twitter feeds to your site? If so, what is the expected delivery time for each special feature?

Related: 12 Reasons to use SEMrush for your website

7. What is your approach to security issues and other potential website problems? It’s essential to know how your webmaster would respond should your site crash or get hacked — and how quickly. Find out how often they would back up the site and all of its content and how they would protect your site against phishing, data theft and malicious file execution.

Other security-related questions: If your website will require users to log in, how will the personal data be verified and protected? If the webmaster creates a shopping cart for you, how will your customers be protected against identity and credit card information theft?

8. How well versed are you in copyright issues? It’s critical for webmasters to be up-to-date on web-related copyright concerns. They will likely be charged with copyrighting all of the text, images and other media on your website. Asking them where they’ll obtain the photos and graphics they’ll use on your site could help you avert potential legal woes. For example, will they use free Creative Commons attribution licensed images or paid commercial stock photo licensed images?

9. Who will own the website? You might think that you would automatically own a site you paid someone to design for you. But if the designer is an independent contractor and not a company employee, you won’t own the site without a “work made for hire” or a “copyright assignment” agreement specifically stating that you own the complete design and all the content.

10. What are your fees and payment terms? It’s crucial to establish from the outset all of the fees for designing, publishing and maintaining your website. You’ll also want to know if the webmaster prefers to be paid by the hour or on a monthly retainer. If the webmaster is designing a new site for you, find out whether you’ll have to pay for hosting and domain name registration charges.