millllka.blogg.se

How to show hidden text on web page
How to show hidden text on web page












Name of a villain) within a sentence that is otherwise visible.

how to show hidden text on web page

Whereas you could also use this for just a few words (like the This is a paragraph of spoiler info that is hidden unless the cursor is hovering over it. Story element for people who haven't seen it yet? Of course not! Enter Spoiler Text! Let's say you were writing about a new movie. Lifting up the hood of this page, the HTML itself is straightforward enough any that should be obscured is simply denoted by the addition of class=”spoiler-text” in the appropriate spot: DEFINING TEXT TO BE HIDDEN (REDACTED) IN HTML Key to realize here is that what’s being manipulated is the background color of the specific named CSS container. Reddit doesn’t use the yellow highlighting, of course, but it’s the same basic idea. Move the cursor directly over one of these black portions and it magically appears, highlighted! In the above you can see that the entire second paragraph is redacted, as is a short passage in the third paragraph. Imagine you’ve come to a film review I’ve written (as it happens, I do write film reviews over on my PlanetDave site, but that’s another story) and there’s some info I don’t want to be visible by default. Let’s start by seeing how content appears when it’s redacted… REDACTED SPOILER TEXT ON A WEB PAGE There are fancy solutions, but the simplest is a combination of HTML and CSS. You can see that used to great effect in the opening credits to the 2014 film Godzilla, for example. There’s something very straightforward and elegant about how Reddit lets you denote spoilers and it does look exactly like the black redaction marks obscuring sensitive information from government documents too. Coupled with JavaScript, it brought the Web to life and we definitely haven’t looked back since with HTML 5.0 and all the very latest improvements.īut sometimes old school still wins the day. Then cascading style sheets (CSS) came along and added an enormous amount of power to layout and Web page functionality. Rudimentary, but it let you have big text, italics, and even change colors as needed.

how to show hidden text on web page

In the earliest days of the Web, we had hypertext markup language, HTML.














How to show hidden text on web page