Learn about the two ways to wait until a DOM element exists before executing a JavaScript function.
Category: Web & Code
From HTML/CSS to PHP to cPanel. This is your first stop for web development help.
How to Check If a Function Exists in JavaScript
Learn how to check if a function exists or not using the typeof operator in JavaScript.
How to Remove Numbers From a String With RegEx
This tutorial will teach you how to match and remove all the numbers in a string using RegEx.
How to Check If a String Is a Number in JavaScript
Learn about the three best ways to check if a string is a number in JavaScript, and when to use each.
How to Insert a Variable Into a String in PHP
Master variable interpolation and concatenation, the two ways to add a variable to a string in PHP, and learn when to use each.
How to Link to JavaScript in HTML
Learn the ins and outs of linking to JavaScript script files from your HTML documents.
How to Call a JavaScript Function in HTML
Everything you need to know about calling JavaScript functions in an HTML document—incl. placement, async/defer, and sync.
How to Check If an Object Is Empty in JavaScript
Learn three ways to check if an object is empty in JavaScript.
Redirect to URL With Parameters in JavaScript
This tutorial will teach you how to redirect the user to a new URL while preserving and/or adding URL parameters.
Do You Need SSL on a Domain With a 301 Redirect?
What you need to know about SSL certificates and 301 redirects — including whether or not you need one for your redirected domain.
What’s the Best Laptop Size for Programmers?
Are you thinking about buying a new laptop? Not sure what size screen to get? We’ve written this guide to help.
How to Get the Value of Text Input in JavaScript
Learn how to get the value of one or multiple text input fields in JavaScript, with annotated code samples.
How to Add an Element to the DOM in JavaScript
Learn how to add DOM elements to an HTML document with confidence using pure JavaScript.
How to Check a Variable’s Type in PHP
So, you want to know how to determine a variable’s data type in PHP? Read on; this tutorial will show you how!
How to Get the Domain Name in PHP
Are you wondering about the best way to get the domain name from the current URL? Read on; this tutorial will help.
How to Check If a String Contains a Substring in PHP
Learn how to check if a string contains a given substring in PHP, with or without case sensitivity — and more.
How to Check for Null in PHP
Not sure how to check for null values in PHP? This tutorial will show you the two best ways to do it, with code examples and without the B.S.
Getting the Parent of an Element in JavaScript
Learn how to get the parent of a DOM element in JavaScript, and which unreliable methods to avoid.
How to Embed YouTube Videos Without Cookies
Learn how to embed the YouTube video player without allowing it to drop cookies on users’ devices.
JavaScript Function With an Optional Parameter
Learn the two best ways to declare a JavaScript function with an optional parameter (and how to give the optional parameter a default value).
How to Find Objects in Arrays With JavaScript
Learn how to find objects within arrays of objects in JavaScript, and how to reference their properties the right way.
How to Store Objects in JavaScript Arrays
Learn how to store a JavaScript object in an array — and how to reference that object or its individual properties in that array.
How to Generate a Random String With JavaScript
Learn about the three best ways to generate a random string with JavaScript, and in which situation to use each.
Check If an Array Contains a Value in JavaScript
Learn about the four best ways to check if an array contains a given value in JavaScript, with code samples.
How to Get the Port Number in JavaScript
Learn about the fastest and most practical way to get the port number of the current URL in JavaScript, without the B.S.
How to Get the Current URL in JavaScript
Learn how to get the current URL of the web page, with or without URL parameters and URL fragments.
How to Create a 2D Array in JavaScript
Learn how to create a multi-dimensional array in JavaScript, and how to reference the items in it for your web app’s needs.
How to Run Python Scripts in WordPress
Yes, you can run Python scripts in WordPress. You can either host the script on your server and use exec() or host it in the cloud and use wp_remote_get().
Remove an Element From an Array in JavaScript
Not sure how to remove an item from an array in JavaScript? We’ll walk you through the best methods and help you pick the right one for you.
The Developer’s Guide to localStorage
Learn the ins and outs of localStorage, the persistent Storage object that you can use for storing data in the browser.
The Developer’s Guide to sessionStorage
Learn the ins and outs of sessionStorage, the session-scoped Storage object that you can use for temporarily storing data in the browser.
Printing in Python: With a Comma or a Plus?
Need to print multiple expressions in Python? Can’t make up your mind between the comma and the plus operator? This guide will help.
How to Open Other Programs in Python
Learn how to open other programs in Python and keep them running in parallel to your script.
Can You Subtract Strings in Python?
No, you can’t. But you can manipulate strings until you get to the value you want. This tutorial will show you how.
How to Comment Out PHP
Learn how to comment out PHP code and find out the most common mistakes to watch out for.
How to Comment Out JavaScript
Learn how to comment out JavaScript code, what to watch out for, and how to prevent it from slowing down your website or app.
How to Comment Out CSS
Learn how to comment out CSS code, what to watch out for, and how to not have it slow down the performance of your web pages.
How to Loop Through an Array in JavaScript
Look for the best ways to loop through arrays in JavaScript? Learn the ins and outs of for, while, forEach, map, and for…of loops.
How to Upload File With Selenium IDE
Learn how to upload a file to a form with Selenium IDE. Wink wink: It’s easier to do than you probably think.
Selenium IDE Click Doesn’t Work?
Did Selenium ID record all the clicks, but one or more of your click commands are not working? We’ve written this guide to help.
How to Format the Date in JavaScript
Learn how to format the date and how to show the date without the time with just a couple of lines of code in vanilla JavaScript.
How to Get Today’s Date in Selenium IDE
Get today’s date in Selenium IDE and format it like a boss. This tutorial will show you how, with code snippets you can reuse and screenshots.
How to Verify Title in Selenium IDE
Not sure how to verify a web page’s title in Selenium IDE? We’ve got you! This tutorial will walk you through the steps, with screenshots.
How to Use an “OR” Operator in Selenium IDE
Do you need to check for two or more values instead of one in your Selenium IDE test cases? Here’s how to make that happen.
How to Create a Multiline String in JavaScript
Need to create a multi-line string in your JavaScript code? Not sure how exactly to do that? We’ll walk you over the three best ways.
The submit() vs. click() methods in Selenium
Need to submit a form as part of your test case? Not sure which method to use? We’ve written this guide to help.
The close() vs. quit() Method in Selenium
Not sure about the difference between the close() and the quit() method in Selenium WebDriver? Here’s what you need to know.
How to Wait in Selenium IDE (2 Ways)
Need to make Selenium IDE wait for a while in the middle of your test case? These are the best ways to make it happen.
How to Use forEach Loops in Selenium IDE
So you want to know how to iterate on the items in a list in Selenium IDE? This tutorial will help you figure it out.
Do You Need the DOCTYPE Declaration?
New to HTML? Wondering if and why you need the DOCTYPE declaration? We explain!
How to Echo an iFrame in PHP
Trying to figure out how to echo an iframe in your PHP code? Here are the three ways to get it done, with code samples.
How to Set Cookies With JavaScript
Ready to become a JavaScript cookie monster? Let’s get those cookies set and show the browser who’s boss.
Top Customizable Free WordPress Themes & Plugins
Transform your WordPress site without spending a penny with any of these highly customizable free themes, plus some useful free plugins.
How to Work on WordPress Without Going Live?
You can work on your WordPress site without going live by changing your privacy settings, using plugins, or working offline on a device.
How to Start Learning JavaScript
Start your coding journey off on the right foot by learning the basics of JavaScript. Check out our latest article on where to begin.
The Beginner’s Guide to Learning How to Code
Coding is for everyone! Learn how to get started with coding, what resources are available to help you, and how to find a community of like-minded peers.
How to Start Learning Python
Python is a great language for beginners and experienced developers alike. Learn the basics and get started on your journey.
Convert Node List to Array in JavaScript
Learn how to convert a NodeList object to an Array in this no-B.S. tutorial.
How to Get Today’s Date in JavaScript
Not sure how to get today’s date and time in JavaScript? This guide will walk you through the process step by step and with code samples.
Troubleshoot Unexpected Identifier Errors in JavaScript
No, you’re not trying to solve the unsolvable. Here’s how to handle unexpected identifier errors in your JavaScript code.
How to Calculate String Length in JavaScript
Calculating a string’s length in JavaScript, for beginners. Everything you need to know (and nothing you don’t).
How to Calculate Tax With JavaScript
The best way to calculate tax with JavaScript (and the pitfalls to watch out for as you do).
How to Iterate Over a Map Object in JavaScript
Are you stuck? Don’t worry, we’ve got you. We’ll show you how to iterate over a map object in JavaScript like a pro.
How to Get an Object’s Class Name in JavaScript
You might not know this, but JavaScript isn’t a class-based programming language as other languages are. So let’s talk about your options.
Check If a String Contains a Substring in JavaScript
Does your string contain ___? There’s a simple way to check. Here’s how to search strings for substrings like a pro.
How to Check If a Variable Is/Is Not Null in JavaScript
Not quite sure how to check if a variable is (or isn’t) null in JavaScript? Don’t worry, we got you. This guide will show you the ropes.
How to Convert Map to Array in JavaScript
This tutorial will show you how to convert a Map object’s keys, values, or key/value pairs to an Array object in JavaScript.
How to Create a Custom Email (With Screenshots)
Tired of having a Gmail or Outlook email address? Want something that looks more… professional? Learn how to create a custom email address.
Is the Index.html File Required?
Wondering whether you need an index.html file on your web server or not? We’ve written this guide to help you find out.
Do HTML Comments Affect Performance?
Leaving comments in your HTML documents makes it easier to edit and debug your code. But does it also have a negative effect on the speed of your website?
Can You Mix CSS and HTML?
Is it possible to mix HTML markup and CSS style sheets in the same document? And if the answer is yes, when is it a good idea to do so?
Are HTML and CSS Worth Learning in 2024?
Not sure if learning HTML and CSS is worth your time? We wrote this guide to help you decide.
How to Comment Code Out in HTML
Did you know you can comment out one or multiple lines of code in your HTML document? Read on to find out how.
The Simplest Template for index.html
Every web project, no matter how big or small, starts with an index.html file. Start yours with this template.
What Is a URL, Exactly?
You’ve heard the term “URL” many times. Now, you want to know what it really means.
How to Name Your HTML Ids and Classes
Learn about the best practices for naming your HTML elements, and the most common conventions for doing so.
Does Index.html Get Cached?
Wondering whether the index.html page of your single-page web app gets cached by browsers? We’ve written this guide to help.
Why Your HTML Code Isn’t Working
Wondering why your HTML code isn’t working? Try this four-step checklist, it might just help!
How to Identify HTML5
Learn about the two ways to identify whether an HTML document is written in HTML5 or not.
Is HTML Case Sensitive?
Do you want to know if tags and attributes in HTML are case insensitive? We have the answer for you, so read on.
Should You Learn HTML Before PHP?
Wondering which web development language to start with? We’ve written this no-B.S. guide to help.
How to Preview an HTML File
Learn how to preview an HTML document in your browser, as well as how to view the source code of that document in your text editor.
How to Make Text Bold in HTML
Learn about the three ways to make text bold in HTML, and the right time and place to each each.
Is CSS Harder Than HTML?
Wondering if writing CSS style sheets is harder than HTML markup? We have the answer for you, and more.