Loading

WIDGETS

Visitor Counter Widget
Click To Go Back To The Widgets Page

Preview

(This is my own site visit count.)


How To Add?

Adding the widget:

Insert this iFrame line between <body> and </body>.

<iframe src="https://404city.neocities.org/widget/visitorCounterV4?sitename=YOUR_SITENAME_HERE&css=YOUR_VISITOR_COUNTER_CSS_FILE_URL_HERE" width="300" height="100" frameborder="0" scrolling="no" title="Visitor Counter"></iframe>
  • After that, replace the YOUR_SITENAME_HERE placeholder with your own Neocities sitename. Example => ?sitename=404city
  • The visitor count will be displayed on this iFrame.

Styling it with CSS:

  • To add custom styling to your widget's iFrame content, create a new CSS file on your site (for example, visitorCounter.css) for the widget's stylesheet.
  • Then, replace the YOUR_VISITOR_COUNTER_CSS_FILE_URL_HERE placeholder in your iFrame source with your CSS file's URL.
    Example => &css=https://mysite.neocities.org/css/visitorCounter.css
  • You can stylize your widget with these ID selectors:
IDElement TypeDescription
#visitorCounterDisplaybodyDisplays visit count.
#visitorCounterDisplay::beforepseudo-element"You are visitor:" text.

Default CSS Definitions

These are the default CSS properties of elements that already defined in your widget iFrame content:

body { margin: 0; overflow: hidden; } body, html {height: 100%;} :where(#visitorCounterDisplay){ display: flex; align-items: center; justify-content: center; flex-direction: column; font-size: 3rem; font-family: Arial, Helvetica, sans-serif; user-select: none; box-sizing: border-box; border: 1px solid #000; } :where(#visitorCounterDisplay)::before { content: "You are visitor:"; font-size: 1rem; box-sizing: border-box; }

HTML Structure

The visual part of the HTML inside the iFrame:

<body id="visitorCounterDisplay">######</body>

Update Log

18 July 2026, Saturday

  • Added "css" parameter to iFrame URL to make CSS file hotlinking more flexible.

24 June 2026, Wednesday

  • Replaced script and internal CSS system with a simpler sitename based parameter system and an external CSS loading.

21 June 2026, Sunday

  • Fixed Proxy server errors.

2 May 2026, Saturday

  • Updated widget with an iFrame system to fix CSP errors.

3 January 2026, Saturday

  • Removed thousands separator from visitor display

14 November 2025, Friday

  • Widget is ready to use!

Click To Go Back To The Widgets Page