Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7093145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:24:09+00:00 2026-05-28T08:24:09+00:00

This has been difficult to get my head around whether it’s even possible, let

  • 0

This has been difficult to get my head around whether it’s even possible, let alone how.

I wish to display text-based “screen captures” from an AS/400. These screens are 80×24 character-based screens which have colour and bold/underline capabilities.

I can copy an entire screen as text and place it between PRE tags and it looks great except that it is missing the underlines which are used to indicate where the input fields are on the screen.

If said input fields are empty, then it is possible to simulate them by replacing the spaces with actual underline characters – which is a bit of a chore – but the fields often display default values which I want to maintain in my representation.

Hence my requirement for monospaced text with preserved whitespace and (presumably ned) underline style applied selectively to specific characters (while maintaining the whitespace!)

I just cannot get my head around what mix of HTML/CSS could be used to achieve this relatively easily. Chiefly, the problem, I think, is the apparent paradox of styles within pre-formatted text.

Any thoughts on approach, technique or basic impossibility of this would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:24:10+00:00Added an answer on May 28, 2026 at 8:24 am

    You can use markup inside a <pre> element. By the specs, only certain kinds of markup elements are allowed there, though browsers are more permissive; but for your purposes, allowed text-level markup is quite sufficient.

    You can use <u> for underline, <b> for bolding, and <font color=...> for coloring, or you can use <span class=...> for all purposes, with different class attributes and with suitable CSS settings.

    This means that the HTML source does not look good, because you start with preformatted text and throw in markup. For example, if you have

    foo bar: umpf
    foo bar: zap
    

    and you want the second “bar” to be underlined, you’d change this to

    foo bar: umpf
    foo <b>bar</b>: zap
    

    and then things don’t look aligned in HTML.

    But the display will be OK, as long as you are careful in adding the tags or in writing program code that adds them (if they can be added algorithmically).

    Underlining and coloring do not change the advance width of a character. Bolding may do that, and often does, but not in monospace fonts. The only exception I found in my quick tests on this is Everson Mono, but you’re probably not using it. There might be other (rarely used) monospace fonts that have the same problem: they lack a bold typeface, forcing programs to either ignore bolding attempts or to apply algorithmic bolding, which often increases the width slightly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

difficult to look this up if it has been asked previously since I don't
Not sure if this has been asked before, it's a bit difficult to explain.
This has been very difficult to track down and has caused me a great
This has been a problem that I haven't been able to figure out for
This has been an adventure. I started with the looping duplicate query located in
This has been driving me crazy for a few days. Why doesn't the following
This has been troubling me for a few years, and was recently exacerbated by
This has been asked before (question no. 308581) , but that particular question and
This has been confusing me for some time. With the advent of UTF-8 as
This has been a rather problematic issue on numerous occasions. We have alot of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.