Read On Medium
Should I Use Linktree

Tutorials | 03 Sep 2022

Copyright Your Website

Copyright Your Website | Learn the correct way to add copyright to your website footer to minimise this error done on 99% of websites online.

How to correctly add copyright to your website

When looking through websites online you sometimes come across a minor error on all of them. And specifically, the copyright that is placed at the bottom of them. With our guess, the web developer who completed the website went with the shortcut job and just added the year himself but this can be a problem in the future because you can always see when a website was last checked over because the year in the footer will say something like 2015. This can defiantly make a website look outdated and can always impact how users portray the site.

The Copyright Code solution

<footer> <p>Copyright: <span id="current-year"></span> © </p> </footer>

Const year = document.querySelector('#current-year') year.innerHTML = new Date().getFullYear()

Code Run Down

This solution uses the programming languages HTML and Javascript to automate the task of updating the current year for copyright. The vital points are the ID in the HTML tag which allows Javascript to select that specific element to change the text to the year when loading the web page.

For the Javascript, it firstly selects the HTML tag with its ID and then creates a new date object that holds the current time and date of the user. Then it uses a built-in function to get the year from the date. Once it has got the year it then adds it to the HTML tag.

services we offer

Web Design Services

Whether you are launching a new website or tweaking your existing site, our web design services will ensure that your business communicates effectively with your target audience.

Ecommerce Solutions

We can build you an ecommerce website that will allow you to sell products online. Our ecommerce sites are setup to allow you to easily mange your products and sales.

Search engine optimization

We’ll expand your reach online by adding content structure, analysing competitors and researching which keywords fit best for your business.

Content Creation

We make sure your brand is portrayed online correctly with professional content showing off the quality of services you offer.

Website Hosting

We guarantee peace of mind by keeping your website safe and secure from hacking and server failure.

Digital Marketing

We can promote your brand to connect with potential clients using various forms of digital communication.