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 7741137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:56:55+00:00 2026-06-01T08:56:55+00:00

I am creating HTML pages with a base string and annotations on top of

  • 0

I am creating HTML pages with a base string and annotations on top of the base string’s words and letters. Right now I’m using the ruby, rb and rt tags and I tried tables and divs too. It looks like this:

text ruby markup

Source:

<body>
<ruby>
<rb>新</rb><rt>しん</rt>
<rb>Brasil</rb><rt>ブラジル</rt>
<rb>1</rb><rt>いち</rt>
etc.

My question is: Is there a way to rewrite the HTML, so the output looks roughly the same, but at the same time allow highlighting only the small characters shown in yellow, without having to select the big letters with them (so that the selection can be copied to the clipboard)?

Right now, and with the simple table cell methods I tried, you are forced to highlight big letters with the small.

The picture makes the association look totally random, but the tricky part is that the markup has to line up centered with the corresponding “big” letters.

  • 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-06-01T08:56:57+00:00Added an answer on June 1, 2026 at 8:56 am
    <style>
    .r { display: inline-block;  text-align: center;}
    .ra { display: block;  font-size: 60%; }
    </style>
    <a class=r><span class=ra>しん</span>新</a>
    <a class=r><span class=ra>ブラジル</span>Brasil</a>
    <a class=r><span class=ra>いち</span>1</a>
    

    On browsers that support ruby markup, the ruby annotations looks selectable and copyable to me. But on IE, when an annotation is selected, the distinctive background color used the browser extends down over the base texts as well, so it looks like you had selected both. If you do Ctrl+C and Ctrl+V then, you’ll see that only the annotation is copied. On Chrome, this problem does not exist: only the selected annotation is highlighted.

    This could still be seen a problem. There is the perhaps more serious problem that Firefox does not support ruby markup.

    The code I suggest above uses text-level markup with classes instead of ruby markup and styling that displays it in a ruby-like manner. I put the annotation before the annotated word, since then it is easy to place the annotation above the base text—without positioning, just by making the container element an inline block and the annotation a block inside it.

    The markup is a bit messy, but this approach works widely across browsers. I suppose main problem is with display: inline-block, but it seems that in simple use like this, support exists even in old versions of IE (from IE 5.5).

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

Sidebar

Related Questions

I have a website that right now, runs by creating static html pages from
I am creating some static html pages outside a .net and outside a ruby-on-rails
I am creating html dynamically using perl, mysql and JS/Jquery ... the basic structure
I'm creating a page that loads content from other pages using jQuery like this:
I m creating a Website as Static HTML pages. In that only in one
I'm just getting into Joomla. I've successfully overridden article pages by creating an html/com_content/article
I'm creating web pages (html) every day, but I would like the pages to
Creating some simple html pages specific for the iphone, and would like to use
I am creating one website where all pages are creating in html but dynamic
When creating menus for html pages, there are a lot of libraries, frameworks and

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.