1

I want to refer to the text which is inside an HTML element, (you can think it is inside a paragraph), can I say containing text of the element? If no, what should I say?

If yes, what is the structure of this adjective?

  • 2
    The text contained by (or contained within) the element. The text which the element contains. – Tᴚoɯɐuo Jun 21 '15 at 15:44
  • @TRomano Is there an adjective+noun alternative? By the way, 12,000 results I found for "the containing text" in Goolge, however you may say that is not much – Ahmad Jun 21 '15 at 15:55
  • @TRomano maybe the "inner text"!? that seems technical. – Ahmad Jun 21 '15 at 16:00
  • 1
    1. Your Google search is not meaningful: "containing text" does not mean "text that is contained" but applies to something which itself contains text. E.g. There are three DIV elements here, two containing text and one containing an image. The Google search is returning examples of ungrammatical usage. 2. You seem to be looking for a single adjective that means "contained-by-an-element". That's not how it would be expressed in idiomatic English. – Tᴚoɯɐuo Jun 21 '15 at 16:01
  • 1
    The text inside the container element is clear (to someone who understands what "element" means in your context). The inner text is jargon and not everyone will understand what it means. Contained text might be a better way to express this idea of being inside a container. Contained is the past participle used adjectivally. – Tᴚoɯɐuo Jun 21 '15 at 16:05
1

First, I'm assuming we are talking about a situation like this:

<tag>contents</tag>

And, as you may have guessed, you would usually call that the "contents" or "text contents" of the element. For example, JQuery API documentation for .text(),[1] where that function is described as:

Get the combined text contents of each element

Your words "containing text" are confusing because it sounds like they are doing the containing. However, it is the text that is in the container.

An alternative correct phrasing would be "contained text of the element".

[1] JQuery .text() documentation, http://api.jquery.com/text/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.