Skip to content
  • Blog (1)
  • About Us
  • Tags
  • Donations
1SMARTchicken - Code Made Easy
  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)

Category: Snippets

1SMARTchicken - Code Made Easy

Category: Snippets

  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)
  • Blog (1)
  • About Us
  • Tags
  • Donations
1SMARTchicken - Code Made Easy
  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)
1SMARTchicken - Code Made Easy

Category: Snippets

  • Tutorials (177)
  • Reference (2172)
  • Snippets (69)
  • Home
  • Snippets
HTML Snippets

HTML – Add a UTM Query String to a Link

January 29, 2025 / HTML Snippets, Snippets / Link, Text

UTM parameters are a set of tags added to the end of off-site, incoming URLs to see where the visitor came from when arriving at your site.

HTML Snippets

HTML – Add nofollow to a Link

July 24, 2024 / HTML Snippets, Snippets / Link

The HTML nofollow attribute tells search engines to ignore the link, and not follow it or pass PageRank to the target site or page.

HTML Snippets

HTML – Create a Phone Number Link

July 24, 2024 / HTML Snippets, Snippets / Link, Text

A phone number listed on the page can be turned into a clickable link using the HTML a tag.

CSS Snippets

CSS – Create a Fixed Icon Bar

July 25, 2024 / CSS Snippets, Snippets / Layout

Some sites have a fixed icon bar sitting off to the side of the screen with their social channels always being displayed. This is how to create one.

CSS Snippets

CSS – Create a Loading Spinner

July 25, 2024 / CSS Snippets, Snippets / Animation

Using pure CSS animation you can create a loading spinner for your site.

CSS Snippets

CSS – Create a Polaroid-Type Image

July 25, 2024 / CSS Snippets, Snippets / Image

Before we all had cameras in our phones, people could take a Polaroid photo which would print directly from the camera, and had a unique, framed look.

CSS Snippets

CSS – Create a Team Member Image Rollover

July 25, 2024 / CSS Snippets, Snippets / Image

If your site has a team member page with images, names, phone, email, etc., you can create rollovers to show all the pertinent info for each team member.

CSS Snippets

CSS – Disable a Form Input

July 25, 2024 / CSS Snippets, Snippets / Form

You may have a form field that auto populates information via JavaScript so you need to disable the input so that the user cannot change the value.

CSS Snippets

CSS – Disable a Text Link

July 25, 2024 / CSS Snippets, Snippets / Link, Text

There may come a time when you have an HTML text link that needs to be temporarily disable for some reason (perhaps it’s auto-created by a CMS, but the page is not yet finished).

CSS Snippets

CSS – Expand a Search Field When in Use

July 28, 2024 / CSS Snippets, Snippets / Animation, Form

To give a site an interesting and modern feel, the transition property can be used to expand the length of the search field when the user clicks into it.

CSS Snippets

CSS – Fading in a Page or Element on Load

February 25, 2025 / CSS Snippets, Snippets / Animation

Fading in a page on load can give site items like a sidebar or icon boxes that load slowly the time to finalize their size/color without the user noticing.

CSS Snippets

CSS – Getting a Pre Tag to Wrap Long Lines

July 28, 2024 / CSS Snippets, Snippets / Text

HTML pre tags are used to format text just as it is written, whitespace and all. However, you may want to allow long lines of text/code to wrap.

CSS Snippets

CSS – Hide Placeholders when the Field has Focus

July 27, 2024 / CSS Snippets, Snippets / Form, Text

Placeholders are text shown inside a form field that suggests to the user the type of input requested. They can be hidden with CSS when the field has focus.

CSS Snippets

CSS – Replace Text Using Position and Visibility

July 27, 2024 / CSS Snippets, Snippets / Pseudo-Element, Text

Replacing text is usually done on the server side or with JavaScript, but there may be times when replacing text using CSS is the only viable solution.

CSS Snippets

CSS – Transition the Fill Color for an SVG

July 27, 2024 / CSS Snippets, Snippets / Color, Image

When you have an SVG on your site and need to transition the fill color on hover, for instance, you need to set the fill in CSS as well as the SVG itself.

JavaScript Snippets

JavaScript – Count Down to a Specified Daily Time

July 26, 2024 / JavaScript Snippets, Snippets / Date

The JavaScript Date object can be used to count down to a specified daily time. For instance, this can be used for a “daily deals” timer.

JavaScript Snippets

JavaScript – Count Down to a Specified Date and Time

July 26, 2024 / JavaScript Snippets, Snippets / Date

The JavaScript Date object can be used to count down to a specified date and time. For instance, this can be used as a prompt for the user to take action.

JavaScript Snippets

JavaScript – Get the Current Screen Size of a Page

July 26, 2024 / JavaScript Snippets, Snippets

The window.innerWidth and window.innerHeight properties can be used to get the current screen size of a page, NOT including its toolbars and scrollbars.

JavaScript Snippets

JavaScript – Write the Current URL to the Page

July 26, 2024 / JavaScript Snippets, Snippets

JavaScript can be used to return the current page URL to write to the page.

JavaScript Snippets

JavaScript – Write Today’s Date to the Page

July 26, 2024 / JavaScript Snippets, Snippets / Date

JavaScript can be used to write the current date to a page, or to write the year to the page, for instance, in the copyright section of your site.

1 2 … 4 Next →

or View All Tags

Tutorials

  • HTML Tutorials (40)
  • CSS Tutorials (45)
    • CSS Flexbox (12)
  • JavaScript Tutorials (6)
  • jQuery Tutorials (13)
  • PHP Tutorials (0)
  • SQL Tutorials (0)
  • Python Tutorials (73)
    • Python File Handling (4)
    • Python and MySQL (5)
  • WordPress Tutorials (0)

Reference

  • HTML Reference (244)
    • HTML Tags (107)
    • HTML Attributes (46)
    • HTML Events (76)
    • HTML Resources (15)
  • CSS Reference (309)
    • CSS Selectors (55)
    • CSS Properties (220)
    • CSS Functions (17)
    • CSS Resources (17)
  • JavaScript Reference (555)
    • JavaScript Selectors (7)
    • JavaScript Operators (12)
    • JavaScript Statements (17)
    • JavaScript Methods (284)
    • JavaScript Properties (162)
    • JavaScript RegExp (45)
    • JavaScript Resources (28)
  • jQuery Reference (220)
    • jQuery Selectors (54)
    • jQuery Methods (140)
    • jQuery Ajax Methods (16)
    • jQuery Properties (17)
    • jQuery Resources (9)
  • PHP Reference (460)
    • PHP Keywords (59)
    • PHP Functions (400)
    • PHP Constants (0)
    • PHP Resources (1)
  • SQL Reference (290)
    • SQL Keywords (59)
    • MySQL Functions (138)
    • SQL Server Functions (83)
    • SQL Resources (10)
  • Python Reference (94)
    • Python Methods (86)
    • Python Resources (8)
  • WordPress Reference (0)

Snippets

  • HTML Snippets (3)
  • CSS Snippets (12)
  • JavaScript Snippets (5)
  • jQuery Snippets (8)
  • PHP Snippets (1)
  • SQL Snippets (3)
  • Python Snippets (1)
  • WordPress Snippets (36)
1SMARTchicken - Code Made Easy

333 Washington Blvd.
Suite 126
Marina del Rey, CA 90292
United States

contact2025@1smartchicken.com

  • About Us
  • Privacy Policy
  • Cookie Policy
  • Terms & Conditions

Search for Code:

or View All Tags

Copyright © 2025 1SMARTchicken | All Rights Reserved.