Let's Discuss What's Next
Have a project or a question? We'd love to hear from you. Contact Us
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.
HTML:
<footer>
<p>Copyright: <span id="current-year"></span> © </p>
</footer>
Javascript:
Const year = document.querySelector('#current-year')
year.innerHTML = new Date().getFullYear()
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.
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.
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.
We’ll expand your reach online by adding content structure, analysing competitors and researching which keywords fit best for your business.
We make sure your brand is portrayed online correctly with professional content showing off the quality of services you offer.
We guarantee peace of mind by keeping your website safe and secure from hacking and server failure.
We can promote your brand to connect with potential clients using various forms of digital communication.