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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:27:52+00:00 2026-06-04T03:27:52+00:00

This problem is not critical… but would be helpful for me to know the

  • 0

This problem is not critical… but would be helpful for me to know the answer. I’ve been using Ryan Bates’ method of putting titles on pages. BTW, he’s a great innovator and contributor to the rails community, isn’t he?

application_helper file:

  def title(page_title)
    content_for(:title) { page_title }
  end

layout file:

<head>
   <title>foo.com - <%= yield(:title) %></title>
   ...
</head>
<body>
   ...
   <h1 class="heading"><%= yield(:title) %></h1>

I am trying to manipulate the title to insert more spaces and make one of the words italicized. I thought that if i put the title together as a variable I might be able to do it. I tried inserting &nbsp; and that doesn’t work. I tried inserting html <i></i> and that doesn’t work. I would like to get it to look like this:

First    Second    Third

How do I change the code below to make the title look like that?

<% ttl = "First Second Third" %>
<% title ttl %>

Thanks for your help.

  • 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-04T03:27:53+00:00Added an answer on June 4, 2026 at 3:27 am

    By HTML syntax, the title element content must be plain text, and browsers actually enforce this: the content is rendered as-is, without interpreting anything as HTML tags.

    You can have no-break spaces there, but you may need to enter them directly as characters (U+00A0).

    You cannot have <i> tags there, no matter what technique you use to generate the title element.

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

Sidebar

Related Questions

[Note: There is another thread about this problem but it did not answer the
This problem is not readily reproducible in a simple example here but was wondering
I've searched google and SO for a solution to this problem but have not
I've been running nagios for about two years, but recently this problem started appearing
I got this problem with AVAudioRecorder not working for me, at least from what
This problem exists for webkit browsers only chrome and possibly safari (i've not tested
This problem is a bit strange. Why is showed Is not null, if the
i have this problem: ms-access could not delete and i found a potential solution
there's this interesting problem i can not solve myself. I will be very glad,
I have run into this problem a few times and I'm not happy with

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.