Hey I am trying to place the \'title\' attribute of a tag located just below and inside the
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.