Where can I practice my HTML, CSS, and JavaScript?

Where can I practice my HTML, CSS, and JavaScript

If you think you have enough knowledge of HTML, CSS, and JavaScript you can practice it through your computer.

So what to do?

How to incorporate all the things you learned into a single project?

Simple, create an example website/webpage.

First, create a topic.

What topic would it be? Well, don’t make it complicated since you are just starting out. Maybe just a simple website where users can navigate through pages, it’s all up to you.

  1. Create localhost on your computer. This is optional only but it will you expand your knowledge on how a website and hosting works.
  2. In creating your webpage, you must decide what elements will appear on those pages. Example, we are creating a four pages website. The pages are home, about us, contact, and blog.
  3. Picture out those pages, all of the pages are the same but except for its content. The point is to code the global sections first! The header where the logo and navigation lies, and the footer.
  4. The process is normally you create your HTML markup (webpage structure). Next, design it with CSS and the JS comes after that. This doesn’t mean you can’t touch your markup once you are done with styling (CSS). You are practicing, so you can tweak whatever you want.

Where can I practice online?

Try with an online code editor like jsfiddle or codepen. You can save or share your code created in there.

What is next after I learned HTML, CSS, and JavaScript?

You can study the different libraries like Jquery, a javascript library. Or start learning about Php language.

Learn more about CSS, HTML, Javascript in 22bulbjungle.

How to add WooCommerce product categories to the WordPress menu?

How to add WooCommerce product categories to the WordPress menu?

By default, WordPress doesn’t show you the product categories to be added to the menu. You might only see the options like -Posts- or the Posts categories.

You’ll wonder how can you can your custom product categories from Woocommerce dynamically without using the custom link in WordPress menus.

So, how to add product categories to the WordPress menu?

Here are the steps:

  • Go to Appearance > Menus
  • Look for the Screen Options at the upper right corner of the dashboard. Expand through clicking on it.
  • In the boxes, you’ll see a list of checkboxes. We want “Product Categories” to show so we make sure that is checked. It will automatically show it on the edit menu options below.

Also, read:  Woocommerce Change Text on Checkout Page | Quick Tutorial

  • Now you can add the categories you want on your menu. Make sure to check what menu you are editing. To do that, check your menu name and the display location.
  • If you’re not editing the right one, look for Select a menu to edit: option then choose your menu and click on select.
  • On the product categories at the left side, select the categories you want to add and then click on the Add to the menu button. These will appear to your selected menu.
  • From there you can rearrange your menu depending on your liking by drag and drop.
  • You can also make the menu as a dropdown by dragging the menu to the right and drop – this will look indented. The menu above will automatically be the parent menu which shows the indented menu as a drop-down
  • Once done, save your menu by clicking on Save Menu button.

How to Create a CSS Glow Effect on Hover

css glow effect

The CSS Glow Effect on hover can be done by using the box-shadow styles. We also have to add transition property to the element.

Step number 1. Let’s create an anchor tag element

  1. <a href="#">glow</a>

Step 2: Add background color and other styles

In our anchor tag, let’s add a background color and change default styles.

I’m going to remove the text-decoration. Add a padding of 15px into top and bottom and 25px for left and right side.

I also add values for fonts, just look into the code below:

  1. a{
  2. background-color: orange;
  3. text-decoration:none;
  4. padding: 15px 25px;
  5. font-family: sans-serif;
  6. font-size: 25px;
  7. color: #fff;
  8. border-radius:10px;
  9. display: inline-block;
  10. }

Read also:

Step 3: Add another selector for hover state

Create another anchor tag selector with :hover state. It should look like this:

  1. a:hover{
  3. }

Step 4. Add the box-shadow styles.

Here is where the magic happens.

Let’s add the box-shadow styles.

We can manually create it on CSS or we can also use the CSS box-shadow generator.

Box-shadow in CSS is the same with text-shadow value parameters. You can view a tutorial on CSS shadow in this video.

In this tutorial, I’m going to use the box-shadow generator.

Get this cool CSS hover effects collection here.

Step 5. Set the Blur Radius.

css shadow generator

From there, you will have to set the Horizontal Length and Vertical Length into zero to ensure that the glow would be the same on both sides of the element.

It is important to have a higher blur radius. This would create the CSS glowing effect. I set this into 100.

Set the Shadow color. I will set the color the same background color with my element.

Leave the other options and copy the code you see on the right.

Step 6. Add the box-shadow styles

That’s it, add these styles to the :hover element.

  1. a:hover{
  2. -webkit-box-shadow: 0px 0px 100px 0px rgba(255,165,0,1);
  3. -moz-box-shadow: 0px 0px 100px 0px rgba(255,165,0,1);
  4. box-shadow: 0px 0px 100px 0px rgba(255,165,0,1);
  5. }

If you try to hover over our element you will see that our shadow has been applied but we don’t like to make it appear real quick.

We will add a delay into the :hover state with our element so it’ll appear as if it was glowing.

I’m going to add transition: .8s ease.

Notice after you add and hover into the anchor tag, the element shows the box-shadow slowly thanks to our transition property.

But it disappears really quick when we unhover?


Just add another transition property with value into the anchor tag.

The final CSS code should look like this:

  1. a{
  2. background-color: orange;
  3. text-decoration:none;
  4. padding: 15px 25px;
  5. font-family: sans-serif;
  6. font-size: 25px;
  7. color: #fff;
  8. border-radius:10px;
  9. display: inline-block;
  10. transition: .8s ease
  11. }
  12. a:hover{
  13. -webkit-box-shadow: 0px 0px 100px 0px rgba(255,165,0,1);
  14. -moz-box-shadow: 0px 0px 100px 0px rgba(255,165,0,1);
  15. box-shadow: 0px 0px 100px 0px rgba(255,165,0,1);
  16. transition: .8s ease;
  17. }

Woocommerce Change Text on Checkout Page | Quick Tutorial

Woocommerce Change Text on Checkout Page tutorial will cover only how to change the texts in the woocommerce checkout page using a function. Manually changing it on the wocoommerce core files is not advisable.

Someone asked me how do they remove the words “have read and” from the Woocommerce checkout page : “I have read and accept the terms & conditions“.

woocommerce change text on checkout page
Woocommerce Change Text on Checkout Page | Radiobox

The first step that was on my mind is using the translation function in wordpress and it should remove the 3 words by replacing the whole text statement.

I am going to change the texts using the Gettext  filter hook in WordPress. I copied the whole texts and created a function, this is the one below:

  1. function woo_checkout_texts( $changed_text, $text, $domain ) {
  2.  if ( $changed_text == 'I have read and accept the terms &amp;amp;amp; conditions' ){
  3.  $changed_text = 'I accept the terms &amp;amp;amp; conditions';
  4.  }
  5.  return $changed_text;
  6. }
  7. add_filter( 'gettext', 'woo_checkout_texts', 20, 3 );

But the when I checked the website’s checkout page, it doesn’t change. I forgot that the link was composed of an anchor tag. Therefore when you translate something you should also add the static markup that is between the text you are translating/changing.

So how?

I looked into the woocommerce plugin folder and find the file containing the texts in it that we can copy and modify into our functions.php file. Yes, we just copy and modify it into our functions.php file.

Modifying and saving plugin’s core file is not a good practice. In a plugin update these changes will get lost.

So to make it professional as possible, I’ve search files inside the woocommerce plugin with a word “checkout”. There, I found the terms.php file. I’ve open it on my editor and found this content.

woocommerce change text on checkout page
Woocommerce Change Text on Checkout Page | Terms

Now I’ve got the idea of how to change texts on the checkout page in woocommerce.

I’ve copied the text and pasted it on functions.php with my function. I’ve copied it again as a translated text by removing the words’ “have read and”.

This is final function below:

  1. function woo_checkout_texts( $changed_text, $text, $domain ) {
  2.  if ( $changed_text == 'I&amp;rsquo;ve read and accept the &lt;a href=&quot;%s&quot; target=&quot;_blank&quot;&gt;terms &amp;amp; conditions&lt;/a&gt;' ){
  3.  $changed_text = 'I accept the &lt;a href=&quot;%s&quot; target=&quot;_blank&quot;&gt;terms &amp;amp; conditions&lt;/a&gt;';
  4.  }
  5.  return $changed_text;
  6. }
  7. add_filter( 'gettext', 'woo_checkout_texts', 20, 3 );

I’ve checked the checkout page, done, now it is finally translated.

This is how you customize the checkout page texts in woocommerce.

CSS Hover Effects | Fade in Text with Background Source Code

Fade in Text with Background Hover

This video is going to show you how to create a CSS Fade in text with background Hover effect. An image is covered with a solid color fades in with a text when a user hovers it.


  1. &lt;!DOCTYPE html&gt;
  2. &lt;html&gt;
  3. &lt;head&gt;
  4. &lt;/head&gt;
  5. &lt;body&gt;
  8. &lt;div class=&quot;wrapper&quot;&gt;
  9.  &lt;img src=&quot;animal.jpeg&quot;&gt;
  12. &lt;div class=&quot;overlay&quot;&gt;
  15. &lt;div class=&quot;content&quot;&gt;Fade In&lt;span&gt;Fade In text&lt;/span&gt;&lt;/div&gt;
  18.  &lt;/div&gt;
  21. &lt;/div&gt;
  25. &lt;/body&gt;
  26. &lt;/html&gt;


  1. .wrapper {
  2. font-family: sans-serif;
  3. width: 80%;
  4. margin: 0 auto;
  5. position: relative;
  6. }
  8. img {
  9. display: block;
  10. width: 100%;
  11. height: auto;
  12. }
  13. .content {
  14. position: absolute;
  15. top: 45%;
  16. left: 50%;
  17. transform: translate(-50%, -50%);
  18. -ms-transform: translate(-50%, -50%);
  19. color: #fff;
  20. text-transform: uppercase;
  21. font-size: 60px;
  22. }
  24. .content span{
  25. font-size: 24px;
  26. display: block
  27. }
  29. .overlay {
  30. position: absolute;
  31. top: 0;
  32. bottom: 0;
  33. left: 0;
  34. right: 0;
  35. height: 100%;
  36. width: 100%;
  37. opacity: 0;
  38. transition: .5s ease;
  39. background-color: #ff771d;
  40. }
  42. .wrapper:hover .overlay {
  43. opacity: 1;
  44. }

Fade In Background Opacity(transparent) Hover


  1. &lt;!DOCTYPE html&gt;
  2. &lt;html&gt;
  3. &lt;head&gt;
  4. &lt;title&gt;CSS hover effects: Fade In Background opacity&lt;/title&gt;
  5. &lt;/head&gt;
  7. &lt;body&gt;
  12. &lt;div class=&quot;wrapper&quot;&gt;
  13. &lt;img src=&quot;highland.jpeg&quot;&gt;
  17. &lt;div class=&quot;overlay&quot;&gt;
  20. &lt;div class=&quot;content&quot;&gt;
  21. the title &lt;a&gt;read more&lt;/a&gt;
  22. &lt;/div&gt;
  26. &lt;/div&gt;
  30. &lt;/div&gt;
  35. &lt;/body&gt;
  36. &lt;/html&gt;


  1. .wrapper{
  2. font-family:sans-serif;
  3. width: 80%;
  4. margin: 0 auto;
  5. position:relative;
  6. }
  7. img{
  8. opacity: 1;
  9. display: block;
  10. width:100%;
  11. height: auto;
  12. transition: .5s ease;
  13. }
  14. .content{
  15. position: absolute;
  16. top:45%;
  17. left: 50%;
  18. transform: translate(-50%, -50%);
  19. -ms-transform: translate(-50%, -50%);
  20. text-transform: uppercase;
  21. font-size: 60px;
  22. color:#fff;
  23. white-space: nowrap;
  24. overflow: hidden
  25. }
  26. .content a{
  27. font-size: 24px;
  28. display: block;
  29. background-color: #ff771d;
  30. text-align: center;
  31. padding: 10px;
  32. cursor: pointer
  33. }
  34. .overlay{
  35. opacity: 0
  36. }
  37. .wrapper:hover img{
  38. opacity: .5
  39. }
  40. .wrapper:hover .overlay{
  41. opacity: 1
  42. }

How to Center an Image in CSS Very Easily

center image in css

There are few pointers to center an image in CSS.

  • First, make sure that the parent element of the image has its width set.
  • Second, the image should not be wider than its parent element, that’s pretty obvious.

See also:  How To Center A Div Inside A Div Easily

Center and Image in CSS horizontally

Images are the same as divs, you can use the text-align into its parent element but not the margin: 0 auto alone on the image.
To center image in div, set a width of the div then add margin:0 auto and display: block into the image in CSS.

The HTML code:

  1. <div class="wrapper">
  2.  <img src="http://22bulbjungle.com/wp-content/uploads/2017/04/rabbit_in_hand.jpg"></div>

The CSS styles:

  1. .wrapper{
  2. width: 100%;
  3. height: 300px;
  4. border: 2px solid #93c504;
  5. }
  6. img{
  7. max-width: 250px;
  8. display: block;
  9. margin: 0 auto
  10. }

This will result into an image centered horizontally:



See the jsfiddle:

Make sure you have a smaller image width than the parent element.

The margin’s first value 0 was for the top and bottom margin. While the second is for left and right margin.

You can also set margin-left: auto and margin-right: auto on the image in CSS.

Center an Image in CSS horizontally and vertically

We will going to use the span element to guide our image  making it center. Setting an image with margin and text-alignment could not make our image center align.

The HTML code:

  1. <div class="wrapper">
  2.  <span class="for-image"></span>
  3.  <img src="http://22bulbjungle.com/wp-content/uploads/2017/04/rabbit_in_hand.jpg"></div>

The CSS styles:

  1. .wrapper {
  2. width: 100%;
  3. height: 300px;
  4. border: 2px solid #93c504;
  5. text-align: center
  6. }
  8. .for-image {
  9. height: 100%;
  10. display: inline-block;
  11. vertical-align: middle
  12. }
  14. img {
  15. max-width: 200px;
  16. height: auto;
  17. background: #3A6F9A;
  18. vertical-align: middle
  19. }


Responsive design images

Creating a responsive design image is very useful for mobile devices.

Responsive image will automatically scale down and adjust to the width of the device.

To create a responsive design image, you just set a max-width: 100%; and height: auto; into the images.

The max-width: 100%; means the image’s width will cover all its parent’s width. You can also set a natural image width(full resolution width of the image) to the max-width property so it will not be basing upon its parent element’s width.

The height: auto; makes the image height and width proportional. As a result, it would not stretch.

What happens if you will not set a height: auto; is, the image’s original height will still be the same while the width is scaling according to the device’s width, so it will be non-proportional.

Background Image Color Overlay | Create a Filter Look with CSS


To add a color overlay to the background image, I am going to use CSS.

First of all, adding a CSS background image color overlay is the most dynamic way of creating tinted web page images. It became popular to many websites which appear in homepage as banners.



The great thing about adding background image color overlay is that you can just change any image (normal image without filter) dynamically and publish it on your website with filter, thanks to CSS.

So, how to do it?

Watch the video or continue reading.

See also:

Add a background property

(Yes not a background-image or background-color).

Within the background property, I add a linear gradient and a URL to the image.  I am using a linear-gradient background with transparency.

  1. background:
  2.    linear-gradient(
  3.    rgba (255, 255, 255, 0.5),
  4.    rgba (255, 255, 255, 0.5)
  5.    ),
  6.    url(image.jpg)

In one CSS property, I need to set two backgrounds. The first one is the linear-gradient color and the second is the actual image.

Because I need to add transparency for the background color opacity, I will define RGBA inside the linear gradient.


  1. linear-gradient(
  2.    rgba (255, 255, 255, 0.5),
  3.    rgba (255, 255, 255, 0.5)
  4.    );

The RGBA is an RGB color with an alpha channel. The alpha channel must be set between 0.0 to 1.0. It is the last parameter of the RGBA. The RGBA parameters are composed of red, green, blue, alpha.

Example: rgba (255, 255, 255, 0.5)

How to choose and get a color?

To make it easier for you to choose the color, create your web page document copying the code from here. Open it in the browser.

Developer tool in your browser is your friend. Right-click and inspect your web page (or CTRL+SHIFT+I).

On your div with the background style, click on the colored square or circle and a color picker will appear. Choose your color by dragging into the palette.


Change the opacity of the color you’ve picked, that is important so we can mimic the overlay or color filter effect in photoshop with our background image.

You can also use CSS Gradient Generator from sites like colorzillacssmatic, or cssportal.

See the jsfiddle:

Use the background-blend-mode

Are you familiar with Photoshop blend modes?

Well, I can also blend our background but with CSS.

I can also use the linear-gradient without the transparency and add a background-blend-mode: soft-light;

The CSS code should look like this:

  1. .block {
  2.  height: 350px;
  3.  background: linear-gradient(yellow, yellow), url(image.jpg);
  4.  background-size: cover;
  5.  text-align: center;
  6.  background-blend-mode: soft-light;
  7. }

As a result, the image and the color blended together in soft-light. Unlike the other way in which I can adjust the opacity.

You can experiment by adding different value into the background-blend-mode property.

background-blend-mode values include:

  • normal
  • multiply
  • screen
  • overlay
  • darken
  • lighten
  • color-dodge
  • saturation
  • color
  • luminosity

CSS Background image color overlay in hover

Add a background image color overlay if the user hovers over the image.

In conclusion, adding the color filter effect can be done in two ways. The first is through a background property with the linear gradient and image url.

The other is to add a solid color within the parameter of linear-gradient and add the background-blend-mode property.

Creating a Hero Image with color filter overlay on hover

Hero image is a large website banner image. It is composed of the background image, texts and even a button.

Learn how to create your hero image with CSS background image color overlay by watching the video below:

You can use either of the two techniques to add the effect into your CSS background image.

Disable Right Click with Javascript

Disable right click with javascript

Disable right click to prevent end users the capabilities to inspect, print, or copy.

I do not recommend adding this into your web-pages but here is the tutorial.

Disable right click with javascript

Disable right click and content copying

Preventing the user from copying your content may also be one of the reason why you want to disable the right click function. It may be useless because someone can manage to use the shortcut key Ctrl+C to copy. Using CSS is a better way to prevent the user from copying.

Try to look at the code below and right-click on the result tab.

Find out how to disable a user from copying your texts using CSS:

Just make sure you also disable the right-click function so a user cannot inspect through right-clicking.

Disable right click on images

The major reason to disable the right-click is to prevent the users from inspecting your code. Preventing them also disable them to download images.

Try to look at the code below and see how the JavaScript function is used to disable the right click into images.

Did you know, a user can also get your images through downloading the whole web document?

The document will have the webpage’s HTML, CSS, JS, images and other files that can be viewed without an internet connection. Images inside the downloaded document were the actual image from a live web page.

Another thing, a user can also use the page info feature in firefox browser to find the image by going to the media tab and clicking on the links to preview the image.

The only problem is, a user can disable the JavaScript in the browser. Hence, the script added would not run.

A user can disable JavaScript in Chrome by going to this path: chrome://settings/content .


Under JavaScript, there are two radio options allow and disallow JavaScript.

In Mozilla Firefox, the user can disable JavaScript by going to this path: about:config within the browser.


Next, click the button saying “I accept the risk”. Search for JavaScript, then right-click and click on toggle.

This will turn JavaScript into false indicates that it is now disabled.

I would not recommend disabling right-click function but if for some reasons / for debugging purposes etc or even a first steps to protect your own copyright images.

How To Disable Text Selection With CSS User Select

css user select

By default, texts on any web page can be highlighted and copied. Disable the highlight function also disables someone to copy the texts in the document. Using CSS user select makes the texts unselectable.

If for some reasons, you do not want your texts inside the button or paragraph to highlighted. CSS user select style attribute might help you.

So how to disable text selection with CSS user select?

Learn how by watching this video or continue reading.

See more amazing CSS videos in youtube: Garnatti one

Target an element and add the following styles

-webkit-touch-callout: none;

It is self-explanatory, add these styles disable the text selection.
Try to select the sentence demo below. This sentence was added with the CSS user select styles.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Notice that you cannot highlight the sentence above means the styles that added worked.

The-webkit-touch-callout attribute targets the ios safari browser, -webkit-user-select targets Chrome, Opera and Safari browsers, -khtml-user-select targets Konqueror, -moz-user-select targets Mozilla firefox and -ms-user-select:none targets internet explorer.

You can use this technique if you want to…

Prevent people from copying your content. Unfortunately, it can be useless if people inspect your code from the browser. They can just copy the content within the source code.

Do not want somebody to copy your contents? The better way is to disable the right-click mouse function.

How To Link CSS To HTML | Step By Step

how to link css to html

There are three ways to link css to html: inline, internal and external stylesheets.

Here is the video you can watch to better see how the different stylesheets are implemented or continue reading for a detailed explanation.

See more amazing CSS videos in youtube: Garnatti one

1. Inline

Use inline style if you want to add a style uniquely to an element. Just add style attribute to the chosen element/tag and then add the style attribute and value.

<h1 style=”font-family:arial; color:red”>Hello World !</h1>

2. Internal

If you want your css to be within the same page as your webpage then internal css stylesheet is for you. Inside the head section add an opening and closing style tag. In the opening style element, add type attribute equals to ”text/css” .

<style type=”text/css”> </style>

Between your opening and closing style tags add desired styling attribute by targeting elements.


<style type=”text/css”> h1{
	font-family: ‘arial’;
	color: red;
} </style>

3. External

If you want your files to be organized then use external css stylesheet. Create a css file and save(the same level with the html file).

Name your css file whatever you want I name mine as style.css. Inside in your head section in html add a link tag to link our css file.


<link rel=”stylesheet” type=”text/css” href=”style.css”>

We can now add styles inside our style.css file just like the internal css styles above but without the open and closing style tags.