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

  • Home
  • SEARCH
  • 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 8322607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:26:47+00:00 2026-06-08T23:26:47+00:00

Hey I am trying to place the ‘title’ attribute of a <section> tag inside

  • 0

Hey I am trying to place the ‘title’ attribute of a <section> tag inside a <h3> tag located just below and inside the <section> tag.The following works

   <section title="General Information">
       <h3>General Information</h3>
       ....
   </section>

what I would like to do is not repeat ‘General Information’ inside the <h3> tag but use CSS content along with attr() to get the info inside of the tittle attribute in the <section> tag and place it inside the <h3> tags.

   <section title="General Information">
       <h3></h3>
       ....
   </section>

   section h3:after 
   {
       content:attr(title);
   }

This as expected looks for the ‘title’ attribute inside of the <h3> tag instead of the <section> tag. Is there any way I can achieve what I am trying to accomplish? Is what I am trying to accomplish the right way of doing things? I know I could skip the <h3> tags altogether and format the <section> tag to display whatever text is in ‘title’ attribute the same way that the <h3> tag would.

  • 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-08T23:26:48+00:00Added an answer on June 8, 2026 at 11:26 pm

    The attr() function can only obtain an attribute from the element that’s generating the content. You won’t be able to get the section element’s title because it’s not the element that’s generating the content.

    As ScottS mentions, you should really avoid having an empty heading element, as there wouldn’t be a point in having it there at all then. Your best bet is to either leave out the title attribute (is it really needed?), or leave the content duplicated.

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

Sidebar

Related Questions

Hey I'm trying to figure out how to convert a statement that works in
Hey, where do I place a text file that I'm trying to read using
Hey im trying to get my head around the following , what is the
Hey I'm trying to figure out a regular expression to do the following. Here
Hey I am trying to just set up the basic structure for some basic
Hey all i am trying to get my code below to work in order
Hey im trying to add countdown timers to an arraylist but it is crashing.
Hey in trying to submit my app to iTunes. It passes the validation, but
hey I'm trying to figure out what this element is in an app I
Hey i am trying to change the background color of a div. I have

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.