Sub topic 3
Inline forms, pop-ups, slide-ins, and bars
This chapter assumes you can write basic HTML and a little JavaScript. It also assumes you know what an email service provider (ESP) does and how a site is split into pages and templates. Here you will learn the four main ways to put a sign-up form in front of a visitor, what each costs and gains, and how to pick one for a given page. Later chapters cover form fields, trigger timing, frequency caps and mobile rules in detail. This chapter only covers the placement decision.
The four placement types
A placement is the combination of where the form appears and how it gets there. Some placements are part of the page's layout. Others are layered on top of it and appear after the page loads. That difference drives most of the trade-offs below.
Inline forms
An inline form (also called an embedded form) is part of the page's normal flow. It sits in a sidebar, between paragraphs, at the end of an article, in the footer, or on a dedicated landing page.
- Strengths: It never covers content, it needs no JavaScript, and it is the easiest type to make accessible. Screen readers and keyboard users meet it in the page's reading order.
- Weaknesses: Visitors who never scroll to it never see it. Footer forms in particular get little attention.
- Best use: A form at the end of a long article catches readers who have just finished something useful. A dedicated landing page is the right target for paid ads and social links, because the page has one job.
Inline forms are the baseline. Build one first, then add overlays only where the data shows a need.
Pop-ups (modal dialogs)
A pop-up is a box that appears over the page, usually dimming the content behind it. A modal pop-up blocks interaction with the rest of the page until the visitor submits or closes it.
- Strengths: It gets attention that other types cannot. Pop-ups typically convert at a higher rate than inline forms, though the exact figures vary widely by site and offer.
- Weaknesses: It interrupts reading. It also has the highest risk of annoying visitors, of failing accessibility checks if built by hand, and of triggering search engine penalties on mobile.
- Best use: A specific, valuable offer shown at a well-chosen moment, such as a free checklist offered to a reader halfway through a related article.
The native <dialog> element opened with showModal() handles focus and the Escape key for you, so prefer it over custom div overlays. Chapter 6 covers accessibility.
Slide-ins
A slide-in (or fly-in) is a smaller box that moves in from a corner or edge, usually the bottom right. It does not dim the page and does not block it. The visitor can keep reading while it is on screen.
- Strengths: It is less disruptive than a modal. It suits long-form content, where a reader may take several minutes to reach the end.
- Weaknesses: It can still cover text, and on small screens it often takes up a large share of the viewport. Animated movement can distract readers and should respect the
prefers-reduced-motionsetting. - Best use: A softer prompt on blog posts, triggered by scroll depth or time on page.
A non-modal slide-in is not a showModal() dialog. It should not trap focus, because the visitor is allowed to ignore it. Remember that when you choose markup for it.
Sticky bars
A sticky bar (or notification bar) is a thin strip fixed to the top or bottom of the viewport. It stays visible as the visitor scrolls.
- Strengths: It is always available but takes little space. It works well for one-line offers and for a single email field.
- Weaknesses: Visitors quickly learn to ignore it ("banner blindness"). A fixed bar also takes a permanent slice of small screens, and it can collide with cookie banners, chat widgets, and mobile browser toolbars.
- Best use: A short, low-pressure offer on pages where overlays would be inappropriate, such as a checkout-adjacent page or a documentation site.
Comparing the types
| Type | Interrupts reading | Needs JavaScript | Typical attention | Main risk |
|---|---|---|---|---|
| Inline form | No | No | Low to medium | Never seen if below the fold |
| Pop-up (modal) | Yes | Yes | High | Annoyance, search penalties, accessibility errors |
| Slide-in | Slightly | Yes | Medium | Covers text on small screens |
| Sticky bar | No | Optional | Low | Banner blindness, lost screen space |
"Typical attention" is a rule of thumb, not a measurement. Your own data (see the measurement chapter) should settle the question for your site.
Choosing a placement
Start from the page and the visitor's intent, not from the tool you want to use. A visitor reading a recipe is in a different state from a visitor who has just landed from a search result and is scanning for an answer.
Use these working rules:
- Always have an inline form. It is the one placement that is always acceptable, accessible, and free of search risk.
- Match the interruption to the offer. A modal pop-up asks the visitor to stop what they are doing. Only a clear benefit, such as the lead magnet from the previous chapter, justifies it.
- Match the type to the content length. Short pages rarely give a slide-in time to appear before the visitor leaves. Long articles suit scroll-based prompts.
- Use one overlay per page view. Stacking a pop-up, a slide-in, and a bar on the same page is the fastest way to lose a visitor.
- Vary by template. The page types in your site (home, article, product, documentation) can each use a different placement, because you set placements in templates.
Where to put inline forms
"Inline" covers several spots with different behavior:
- After the content. Readers who finish an article are the most engaged. This spot often performs better than a sidebar.
- Inside the content. A short form after the second or third section catches readers who skim. Keep it visually distinct, with a heading that states the benefit.
- Sidebar. It is visible on wide screens, but most themes move it below the content on mobile, which is where it often goes unseen.
- Footer. Useful as a fallback so that every page has a way to subscribe, but do not rely on it for growth.
- Landing page. The page carries only the offer, the form, and proof. Link ads and social posts here.
A sticky bar in HTML and CSS
This example shows a bottom bar with one accessible email field. The label is visually hidden but still readable by screen readers, and the bar adds padding to the page so it never hides the last lines of content.
<style>
body { padding-bottom: 4rem; }
.signup-bar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
gap: 0.5rem;
align-items: center;
justify-content: center;
padding: 0.75rem 1rem;
background: #1f2937;
color: #ffffff;
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
</style>
<form class="signup-bar" action="https://example.com/subscribe" method="post" aria-label="Newsletter sign-up">
<span>Get one practical tip every Friday.</span>
<label for="bar-email" class="visually-hidden">Email address</label>
<input type="email" id="bar-email" name="email" autocomplete="email" required>
<button type="submit">Subscribe</button>
</form>A real deployment also needs a consent statement and spam protection, which later chapters add. A bar like this should also give visitors a way to dismiss it, and should not be shown again to someone who has already subscribed.
Common errors
- Choosing the overlay first. Teams often install a pop-up tool and then look for a place to use it. Choose the placement from the page and the offer.
- Hiding the only form in a pop-up. If the pop-up fails to load, is blocked, or is dismissed, the visitor has no other way to subscribe. Keep the inline form.
- Ignoring the small screen. A sidebar that drops to the bottom, a bar that fills a third of a phone, and a slide-in that covers the article are all common results of testing only on a desktop.
- No exit. A close control that is tiny, low-contrast, or missing leads to frustration and, on mobile, to search penalties (see the mobile chapter).
- Showing the form to existing subscribers. Without a flag or cookie, loyal readers see the same prompt on every visit.
- Judging by raw conversion rate alone. A pop-up may lift sign-ups while raising bounce rates or lowering subscriber quality. Compare the downstream numbers (confirmations, opens, unsubscribes) as well.
Summary of decisions
Start every page with an inline form. Add one overlay (a pop-up, slide-in, or bar) only where the offer is strong and the visitor's intent supports it. Choose the least interruptive type that gets the job done, then measure it and adjust.
Exercise
A blog has long tutorial articles (about 3,000 words each) and a short "About" page. The only sign-up form today is in the footer, and sign-ups are low. Propose a placement for each page type and justify it in two or three sentences. Include one risk you would watch for.
Show answer
For the tutorial articles, add an inline form after the content, where engaged readers finish, and a slide-in triggered by scroll depth, since the length gives it time to appear and it does not block reading. Keep the footer form as a fallback. For the About page, use only an inline form near the text that describes the newsletter, because the page is short and an overlay would interrupt it. One risk to watch: the slide-in covering text on phones, so test it on a small screen and make sure it has an easy close control. Also check that conversion gains are not offset by higher bounce rates.
Exercise
Why should a site keep an inline form even when it already uses a pop-up that converts well?
Show answer
The inline form is always available, needs no JavaScript, is easy to make accessible, and carries no search-penalty risk. If the pop-up is blocked, fails to load, or is dismissed, the inline form is still a way to subscribe.