JavaScript Reverse String Code Challenge
One of the first code/algorithm challenges that we set out to solve as budding software engineers and web developers is to see if we can figure out how to reverse a string. Remember that a string is just a collection…
How to Create and Style Horizontal Lines in HTML
Sometimes when creating the flow of your web page, you’ll want to find some way to section your content off into visually distinct parts. In this article, we’ll learn about the horizontal rule in HTML and how to put it…
Creating Tabs in CSS Without Using JavaScript
CSS Tabs are really great at displaying associated information in one easy-to-navigate place. They essentially look like tabbed dividers that you would see in a recipe box or a binder. Here are some examples of websites using tabbed navigation: Southwest…
When and How to Use the CSS Clearfix Hack
As coders and programmers in the generation of CSS Flexbox and CSS Grid, we don’t often consider CSS Clearfix. CSS Flexbox and Grid solve the position of elements a little better (and a little easier!) than using floats. Nevertheless, we…
HTML Background Color
CSS can be intimidating even for seasoned developers—there are so many options! But in this article, we’ll discuss how to change the background color in your HTML document without creating a separate cascading style sheet. When using HTML5, you can…
CSS !important Rule: When to Use it
The !important rule is used to override the styling of a webpage. In all honesty, there are more instances of why you shouldn’t use the !important rule vs why you should. Let’s discuss how it’s used and then why it…
CSS Padding vs Margin: How to Tell the Difference
When I first started learning how to write markup using HTML and CSS, it took some time to actually wrap my mind around the differences between margin and padding in the box model. In this article, I will share how…
How to Create a Basic CSS Overlay
An overlay is an effect used on a website to steer users in the right direction of the next action they must take. Correct usage has the ability to create a positive user experience, which will keep users on your…
Create Line Breaks Without Having to Use br in HTML
A line break can be added to HTML elements without having to utilize a break return <br> by using pseudo-elements. Pseudo-elements are used to style a specific part of an element. Here we will use ::after to style an HTML…
How to Use Text-Indent in CSS
The CSS indent property, known as the text-indent property, appears similar to a standard indent on the first line of every paragraph in an essay or paper you may have written in school; it indents the first line of every…
CSS Cropped Images
There are several ways to crop an image in CSS; however, the simplest and most effective of these are: Using object-fit: When using object-fit: cover, we can easily crop the image and still maintain the picture’s aspect ratio. You can…
CSS Font-Kerning, Letter-Spacing and Word-Spacing Property
When learning CSS basics, we tend to focus on the box model, how to position components on the page, and the design system elements, like font-family and font sizes. If we dive even deeper into how the font looks on…
How to Use CSS to Hide Scrollbars
Scrollbars and User Experience Users are now accustomed to a certain experience when navigation websites. For example, you would expect the logo of a business in the upper left corner of a site to take you to the homepage. But…
CSS: Object Fit
The CSS property object-fit scales an element to within the width and height of the container it’s in. Background images are the most common element that you will come across as a developer that uses this property. There are five…
Centering Text in HTML
How to Center Text in HTML One of the first things we learn as programmers is how to align blocks of text. In this article, we’ll take a look at how to align text in the center of your container…
CSS Sticky Footer
Sticky footers are not to be confused with fixed footers – a sticky footer is a pattern where the footer always sticks either to the bottom of the screen (in cases where content does not fill up the page) or…
CSS Border Image
The border-image property in CSS is a bit tricky to wrap your mind around at first. In this article, we’ll discuss what the border-image property is, how to use it and its idiosyncrasies when it comes to using it in…
How to Create HTML Image Links
Images are common components of any web page. They are also a great way to create a link to another page. By using a combination of anchor tags with an href attribute and image tags, we can create an image…
What are HTML divs and how are they used?
The <div> is a generic container that is used in HTML to group elements together so style can be applied to them using CSS; div elements are empty by default and have to be filled with HTML elements to work.…
CSS Flexbox
The CSS Flexbox Model was created to improve the established CSS Box Model. The Flexbox Model still contains the major elements of the Box Model (margin, padding, border and content), but offers flexibility to best fill the space with the…
How to Link CSS to HTML to Make Markup More Readable
As coders who have just learned CSS, we first start to incorporate CSS to our web pages as inline-styling. We use the style attribute to inject the CSS directly on our HTML element: <!DOCTYPE html> <html> <head> <title>Inline Style</title> </head>…
How to Insert Icons Using a CDN
Icons work well for illustrating actions a user can take in an application. There are several icon libraries readily available. Here are a few of the many: Font Awesome - https://fontawesome.com/Flaticon - https://www.flaticon.com/Material Design Icons - https://material.io/resources/icons/ There are certainly…
CSS Padding: A Step-By-Step Guide
The CSS padding property creates a space between an element’s borders and content contained inside of that element. Padding has subproperties that allow for unique padding sizes on all sides and accepts inherit, length, and percentage as values. When you’re…
CSS Inline-Block
The display property is integral to the layout of a webpage. The display property determines how an element is displayed in relation to the elements around it. There are several values for this CSS property; the most used values include…
Declaring an HTML Doctype
When starting a new HTML document, one of the first things to do is write your document type declaration. A doctype declaration tells the browser that the page to be rendered is written in HTML. To declare an HTML5 doctype,…
Adding HTML Space Tags
When writing HTML, you’ll notice additional spaces made when you press the spacebar do not appear when text is rendered in the browser. For example: <p>April is the cruelest month,</p> <p>April is the cruelest month,</p> In the first <p> tag,…