mobile menu trigger, icon

Blog

I discuss Git, web and server-related programming, and anything I use to streamline my web development workflow.

How to add borders in HTML table [CSS examples]

To add a border in the HTML table, target the <td> tag in your CSS and assign a border value for it. See the following CSS below. I have the following HTML for the table. With the above one line of CSS, my table looks like the following: Column 1 Column 2 Column 3 Column 4 Apple Bicycle Carrot Dog Elephant Fire Giraffe House Ice Jelly Kite Lemon In the above table, you see that there is a little gap between cells. This gap is coming from the web browser. To get around this default gap, specify the border-spacing for […]

Read More →

How to remove HTML table border?

Sometimes HTML tables may get borders automatically from your web browsers or other parts of your website. So, the “border: none” value may not work always. In this post, I will show you a couple of solutions to remove borders. Different ways to remove borders in tables I have a demo table below but I did not write any CSS for it. Column 1 Column 2 Column 3 Column 4 Apple Bicycle Carrot Dog Elephant Fire Giraffe House Ice Jelly Kite Lemon Moon Night Orange Pineapple And I have the following HTML for the above table: I didn’t even write […]

Read More →

How to create multiple-color text in HTML CSS?

To create multiple-color text, you need to write CSS for the different parts of the text. In this post, I will show you how to use multi-color in a sentence & word. This is the technique I used on many websites that helped me to make attention-grabbing content. Let’s see how you can do that. How to create multicolor text in HTML CSS? You can use two main different ways to implement multiple colors in a single sentence or word. One is a gradient color and the other one is a simple color property. Together we will explore all the […]

Read More →

How to make a div scrollable?

Scrollable div

You can make a <div> scrollable using the CSS overflow property. The overflow can be used in two directions such as X & Y (horizontal & vertical). In this post, I will show you how to make a scrollable <div> vertically & horizontally, and both. How to make to div vertically scrollable? To make a <div> vertically scrollable, use the overflow-y CSS property and specify its value to scroll. First, see the example below and then I will give you the HTML & CSS for it. Example: vertical scrolling div Lorem ipsum, dolor sit amet consectetur adipisicing elit. Fugiat corporis […]

Read More →

How to create a mouse hover HTML tooltip text?

How to create a mouse hover tooltip text

Using the “title” attribute, you can show a mouse hover text in your HTML document. Sometimes it’s known as a tooltip, mouseover & help text. Once you hover your mouse over a certain text or link or button, a piece of additional information pops up. And it disappears after you leave your mouse. This is something that I will show you in this post. However, the title attribute has a default style. But you can add a custom style to the tooltip using HTML data-attribute and some additional CSS. See an example of a custom tooltip below: Hover on me […]

Read More →

How to create an About Us page using only HTML CSS (download template)

I will give you an “About Us” page template to download in this post. It was built with only HTML & CSS. But it looks very professional & mobile-responsive. I will also show you how I built this About Us template from scratch. So you can learn basic HTML & CSS. If you’re already familiar with or an expert, you can go to the bottom of this post to find the download option. Before we move forward, let’s the finished product (about page) in the link below. Let’s get started. A few facts about this template When I created the […]

Read More →

How to create a testimonial page in HTML CSS (download template)

If you’re running a static website, this post can help you to build a testimonial page using only HTML & CSS. Also, if you were looking for a testimonial template to convert into a CMS like WordPress, or Joomla, it can also help you. My main goal is to teach you how to create a professional testimonial page on a static website & how to write the HTML & CSS. End of this post, I will give you the template so you can download it. And you can also customize the template to upload it on your own projects. How […]

Read More →

How to insert a video in HTML & make it mobile responsive?

Insert video in HTML and make it mobile responsive

You can insert a video in a couple of ways such as using a video tag, iframe, etc. Also, you can upload the video directly to your project folder, Youtube, or Vimeo, and add it to your HTML web page. However, many web designers don’t pay attention to making the video responsive for mobile & other small devices. In this post, I will show everything you need to add a video to your static web pages properly. Such as: Let’s get started. How to insert a video into your HTML document? Below I have mentioned a couple of use cases […]

Read More →

How to style buttons with CSS (9 examples included)

buttons CSS and examples

You can write CSS to style buttons to make it look exactly how you want. There is no right or wrong way to style buttons. You can also come up with many creative buttons in CSS. Here, I have included a couple of live examples that you can use as inspiration. Some of these buttons have animations. Hover your mouse over each of these buttons to see the animation in action. Example #1 Learn more » Example #2 Learn more » Example #3 Learn more » Example #4 Learn more » Example #5 Learn more » Example #6 Learn more […]

Read More →

How to embed PDF in HTML & make it responsive?

You can embed a PDF file in an HTML document using the <embed>, <iframe> or <object> tag. See the examples below. Embed PDF using the <embed> tag However, to make it mobile responsive, write the following CSS. This will add a horizontal scrollbar to the smaller screens. On the desktop, it looks like the following screenshot. You can do the same with iframe & object tags. Using iframe tag Using object tag Embedding PDF with the object tag has an extra advantage. If someone’s browser does not have a built-in PDF viewer, he/she can see a custom message and download […]

Read More →