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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:45:35+00:00 2026-06-10T03:45:35+00:00

Supposing I had the following HTML: <html> <head> <title>My Test Page</title> </head> <body> I

  • 0

Supposing I had the following HTML:

<html>
    <head>
        <title>My Test Page</title>
    </head>
    <body>
        I liked the book <cite>Catcher In The Rye</cite>.
        I also liked the book <cite>The Great Gatsby</cite>.
    </body>
</html>

What I would like to know is if there is a way to select all the strings in between the <cite> and </cite> tags? What I am trying to do is add a css style to all text in between the cite tags. I know I could add a common class attribute to each one and select them using the class name, but there is a lot and I would hate to add it to each one. Does jQuery have a selector for cite tags?

  • 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-10T03:45:37+00:00Added an answer on June 10, 2026 at 3:45 am

    $("cite") should get all instances.

    In jQuery, there are three main selectors:

    1. By tag name: $(“cite”)
    2. By class: $(“.someClass”)
    3. By ID: $(“#SomeID”)

    A good way to think of it is “how would I go about defining a CSS definition to style one or more elements”? Generally that answer will give you a good selector to use in jQuery.

    In your case, you could iterate over each CITE element and get the text/html like so:

    $("cite").each(function() {
      var theText = $(this).text();  // example to get text
      var theHtml = $(this).html();  // example to get html
      // do whatever you want with these values
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Supposing I had a multi-form page such as: <form id=A class=jaxy ... /> <form
I'm asking this with the intention of also supplying the answer, since I had
The following simply loads a jquery-ui dialog from an external html file. $('#showdialog').click(function(e) {
Please forgive the awkward title. I had a hard time distilling my question into
Following on from this earlier question , I've had a look at the Heroku
Supposing you had a data model that looks like: /-----------------------\ /-----------------------\ | Patient |
I'm building a status page which should be refreshed periodically. So, I've had a
Supposing, for example, that I had a 10x10 cloth mesh, with each square being
Supposing the following scenario: Company A asks company B to produce an IPad App
Supposing I have a StringerHelper(Component|Helper|Behaviour).php class with a method for random strings. I might

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.