Free Scrolling News Ticker for Your Website

A breaking-news bar, a stock-style ticker tape or rotating headlines, with a pause button built in. Copy the free HTML below, or describe your ticker to the AI and paste two lines into WordPress, Shopify, Squarespace or Wix.

Breaking
  • Riverside Library opens on Sundays from 1 December
  • Main Street closed between 2nd and 4th Ave this weekend
  • Farmers market moves indoors to the Civic Hall for winter
  • School board meeting moved to Thursday at 7pm
  • Volunteers needed for the park clean-up on Saturday
Style
Speed
60 pixels per second

Example headlines and made-up figures. Hover or focus the ticker to pause it, or use the pause button. If your device asks for reduced motion, it starts paused.

Free News Ticker HTML and CSS Code

Prefer to write it yourself? This is a complete scrolling ticker you can paste into any page that accepts HTML. It loops without a gap, pauses on hover and keyboard focus, has a pause button, and stops moving for anyone who has asked their device for reduced motion. Free to copy and use, no account needed.

<div class="ticker" role="region" aria-label="Latest news">
  <span class="ticker-label">Latest</span>
  <div class="ticker-window">
    <div class="ticker-track">
      <ul class="ticker-list">
        <li>First headline goes here</li>
        <li>Second headline goes here</li>
        <li>Third headline goes here</li>
      </ul>
      <ul class="ticker-list" aria-hidden="true">
        <li>First headline goes here</li>
        <li>Second headline goes here</li>
        <li>Third headline goes here</li>
      </ul>
    </div>
  </div>
  <button type="button" class="ticker-toggle">Pause</button>
</div>

<style>
  .ticker { display: flex; align-items: center; background: #111827; color: #fff; font: 500 15px/1.2 system-ui, sans-serif; }
  .ticker-label { padding: 12px 14px; background: #dc2626; font-weight: 800; text-transform: uppercase; }
  .ticker-window { flex: 1; overflow: hidden; }
  .ticker-track { display: flex; width: max-content; animation: ticker-scroll 40s linear infinite; }
  .ticker-list { display: flex; margin: 0; padding: 0; list-style: none; }
  .ticker-list li { padding: 0 32px; white-space: nowrap; }
  .ticker-window:hover .ticker-track,
  .ticker-window:focus-within .ticker-track,
  .ticker.is-paused .ticker-track { animation-play-state: paused; }
  .ticker-toggle { margin: 0 8px; padding: 6px 10px; font: inherit; cursor: pointer; }
  @keyframes ticker-scroll { to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
    .ticker-list[aria-hidden] { display: none; }
    .ticker-window { overflow-x: auto; }
  }
</style>

<script>
  document.querySelectorAll('.ticker-toggle').forEach((button) => {
    button.addEventListener('click', () => {
      const paused = button.closest('.ticker').classList.toggle('is-paused');
      button.textContent = paused ? 'Play' : 'Pause';
    });
  });
</script>

How the seamless loop works

The headlines are in the track twice. The animation moves the track left by exactly half its width (translateX(-50%)), which is one full copy. At that moment the second copy sits where the first one started, so the jump back to zero is invisible. Both lists need the same padding, or the loop stutters. The second copy has aria-hidden="true" so screen readers read each headline once.

Setting the speed

CSS sets a duration, not a speed, so a longer list scrolls faster at the same 40 seconds. To get a speed, divide the width of one copy by the pixels per second you want. A copy 2,400 pixels wide at 60 pixels per second needs 40s. Add headlines later and you have to redo the sum, or measure the width with a few lines of JavaScript, as the demo above does.

The code covers one ticker with fixed text. If you want links on each headline, a breaking label that changes colour, a ticker that switches to vertical on phones, or headlines you can change from a dashboard without touching your site, describe it to the AI and embed the result instead.

Horizontal Crawl or Vertical Rotation?

Most people picture a horizontal crawl when they hear "news ticker", but a vertical ticker that shows one headline at a time is often easier to read. Switch between them in the demo at the top and compare.

Horizontal crawlVertical rotation
How it movesA continuous crawl from right to leftOne headline at a time, sliding up or fading in
Headline lengthShort: under about 50 charactersUp to a full sentence
On a phoneLong headlines never fit on screen at onceEach headline fits, wrapped if needed
Reading effortVisitors track moving textText sits still while it is read
Best forMany short items, stock-style figures, a broadcast lookA few announcements, mobile-heavy sites

You do not have to choose one for every screen. A common setup is a crawl on desktop that turns into a vertical rotation below about 600 pixels wide.

Ticker Tape, News Ticker or Marquee?

The names overlap, and people search for all of them. This is how they are usually used:

News ticker
A strip of headlines, often with a label such as "Breaking" or "Latest". It may crawl sideways or rotate one headline at a time.
Ticker tape
The stock exchange look: symbols, prices and up or down changes in green and red, crawling in a dark strip. Named after the paper tape from telegraph tickers.
Crawl
TV's word for text moving sideways along the bottom of the screen. On a website it means the same as a horizontal ticker.
Marquee
Any horizontally scrolling strip of text or logos. Also the name of an old HTML tag, which is the next question.

Why not use the <marquee> tag?

HTML once had a <marquee> tag that scrolled its content with no CSS at all. The HTML standard now lists it as obsolete. Browsers still render it so old pages keep working, but it has real problems:

  • There is no built-in pause control, and it ignores the reduced-motion setting.
  • It does not loop seamlessly. The text runs off the end and the strip sits empty before it starts again.
  • Speed is set in pixels per step (scrollamount), so motion can look jerky.
  • Validators and accessibility checkers flag it, and support could be removed from browsers in future.

A CSS animation, like the free code above, does the same job without those problems.

How Fast Should a Ticker Scroll?

Slow enough that a visitor can read a headline in one pass. A simple way to check is to work out how long each headline stays on screen:

Time on screen = (width of the ticker + width of the headline) / speed in pixels per second

A ten-word headline in 15-pixel text is roughly 500 pixels wide. On a 1,200 pixel desktop ticker at 60 pixels per second, it is visible for about 28 seconds and fully visible for about 12. That is plenty.

On a phone the ticker may only be 300 pixels wide once the label and pause button take their share. The same 500-pixel headline never fits on screen at once. Visitors have to read it as it slides past, which is tiring for long headlines. That is why short headlines matter more than speed on mobile, and why the vertical style is often better there.

  • Start around 40 to 80 pixels per second for headlines. Short items such as stock symbols can go faster.
  • Keep each item short. Under about 50 characters, the length of a newspaper headline, reads well at any width.
  • Use fewer items. Five headlines that come round often beat fifteen that a visitor sees once.
  • Leave a gap or separator between items, so it is clear where one ends and the next starts.

Make the Ticker Accessible

Moving text is the part of a ticker most likely to cause problems. Some visitors cannot read text in motion. For others, it makes the rest of the page hard to focus on, and for people with vestibular disorders motion can cause dizziness. These checks cover the main issues:

  1. A pause button (WCAG 2.2.2). Content that moves on its own for more than five seconds, next to other content, needs a way to pause, stop or hide it. Hover alone does not count, because keyboard and touch users cannot hover.
  2. Pause on focus as well as hover. If the headlines are links, the ticker has to stop when someone tabs into it, or they are tabbing through moving targets.
  3. Respect reduced motion. When the device setting prefers-reduced-motion is on, stop the animation and show the headlines still, or start the ticker paused.
  4. Read each headline once. Hide the duplicate copy from screen readers with aria-hidden, and do not put the ticker in an aria-live region, which would read every change aloud.
  5. Do not rely on colour alone. In a ticker tape, pair green and red with ▲ and ▼ or a + and - sign.

The demo at the top does all five. When you build a ticker with MightyWidgets, ask for "a pause button and reduced-motion support" and check it the same way.

Where the Headlines Come From

With MightyWidgets you type the headlines into the widget, in the chat or in the editor, and publish. To change them, edit the widget in your dashboard and publish again. Every page with the ticker on it updates, and you never touch the snippet on your site.

It does not pull headlines automatically. The ticker cannot read an RSS feed, your blog, a Google Sheet, live stock prices or sports scores. Figures in a ticker tape are numbers you enter. If you need a ticker that updates itself from a feed every hour, use a feed plugin for your CMS instead.

Because the ticker runs JavaScript in the visitor's browser, a few things are possible without a feed: hiding a headline after a date you set, showing different headlines on weekdays and weekends, or a close button that stays closed for that visitor. The one live source MightyWidgets can read is a YouTube channel, so a strip of your latest video titles is possible too; see the YouTube feed widget.

Details Worth Asking For

A web page displaying a news ticker with "Keep Visitors Informed with a News Ticker" as the main headline.
A label and separators. A coloured "Breaking" or "Latest" label tells visitors what the strip is. Bullets or dividers between items show where each headline ends.
A news ticker widget on a web page shows a headline and options for controlling its behavior.
Controls visitors can use. A pause button, pause on hover and focus, and previous and next arrows for a vertical ticker.
A web page shows a news ticker with "Q3 Product Roadmap Released" highlighted and a prompt to go to the blog for details.
Headlines that link. Point each headline at the full story, a product or a sign-up page, with a "Read more" cue on hover.

Put the Ticker on WordPress, Shopify, Squarespace or Wix

When you publish, MightyWidgets gives you this snippet with your widget's ID filled in. A ticker usually belongs just under the site header, so where possible paste it somewhere that appears on every page:

<script src="https://cdn.mightywidgets.com/load.js" async></script>
<div data-mightywidgets-id="YOUR_WIDGET_ID"></div>

WordPress

For every page, open the Site Editor, edit the Header template part and add a Custom HTML block under the menu. For one page, add the block to that page.

Shopify

In the theme editor, add a Custom Liquid section to the Header group so the ticker shows on every page, then paste the snippet into it.

Squarespace

Add a Code block where the ticker should sit and paste the snippet. Squarespace only runs scripts in Code blocks on its Core plan and above.

Wix

Add an Embed HTML element and paste the snippet. Stretch it to full width, then right-click it and choose Show on All Pages.

Webflow (Code Embed element), Ghost (HTML card) and plain .html files work the same way. Want it pinned to the top of the screen while visitors scroll? Ask the AI for a sticky ticker.

Prompts to Start From

Tell the AI what the ticker is for, what it says and how it should move. For example:

  • Local news site: "A red BREAKING label and a dark bar with five headlines, each linking to its story. 50 pixels per second, pause button on the right, pause on hover and focus."
  • Shop: "A thin ticker above the header: Free shipping over $50, New autumn range is in, Order by the 18th for Christmas. Our brand colours #1d3557 and #f1faee."
  • Exchange rates: "A ticker tape with currency pairs and today's rates that I will update by hand. Green ▲ or red ▼ beside each change, monospace font."
  • School or club: "A vertical ticker that shows one notice at a time for 5 seconds, with previous and next arrows. Hide the open day notice after 30 November."

News Ticker Questions

Is the news ticker free?

Yes, to start. The Free plan includes 50 credits for building and editing with AI, and your widget's first 100 loads each month are free. After that each load uses one credit; if you run out, the ticker keeps working with a small "Powered by MightyWidgets" tag. The HTML and CSS ticker on this page is free to copy with no account at all.

Can the ticker pull headlines from my RSS feed or blog automatically?

No. You type the headlines into the widget, or ask the AI to change them, and publish. MightyWidgets does not read RSS feeds, blogs, Google Sheets or news services. If your headlines change several times a day, a ticker built into your CMS or a feed plugin will suit you better.

Can it show live stock prices or sports scores?

No. The ticker tape style can show symbols, prices and green or red changes, but they are figures you enter, not a live feed. That works for things you update yourself, like fixed rates, product prices or yesterday's results. It is not a market data or live score service.

How do I change the headlines later?

Open the widget in your dashboard, edit the text or ask the AI ("replace the second headline with...") and publish. Every page that embeds the ticker updates, and the two-line snippet stays the same.

Can each headline link to a different page?

Yes. Give the AI a URL for each headline. Ask for links to open in the same tab for your own pages and a new tab for other sites. Keep in mind that a moving link is hard to click, which is one more reason to pause the ticker on hover and focus.

How fast should a news ticker scroll?

For headlines, around 40 to 80 pixels per second is a comfortable range for most readers. Short items and stock-style figures can go faster. If people have to wait for the text to come round again, slow it down or switch to the vertical style.

Does a scrolling ticker need a pause button?

If it moves for more than five seconds, yes. WCAG 2.2.2 (Pause, Stop, Hide) asks for a way to pause or stop it. Pause on hover is a good extra, but it does not help keyboard or touch users, so add a real button too. Ask the AI for one and it will be part of the widget.

Does the ticker work on phones?

Yes. It fits the width of the screen. On a phone the visible part of a horizontal ticker is narrow, so keep headlines short or ask for the ticker to switch to the vertical style below a set width.

Will a news ticker help my SEO?

Not directly. An embedded widget is drawn by JavaScript after your page loads, so search engines are less dependable about crediting its text to your page. Treat the ticker as a way to point visitors at pages, and keep the words you want to rank for in your page's own copy.

Build Your News Ticker

Type your headlines, pick a style and paste the snippet. Free to start.

Get Started Free