Is there a markup for word boundaries in HTML?

  Kiến thức lập trình

In short, when you look at:

<p>Hello</p><p>World</p>

You see (in markup) two paragraphs. I am looking for its counterpart for delimiting/enclosing words.

I looked through all HTML tags but I don’t see anything relevant, and worse even if I abuse existing tags like div I don’t get expected effect. So the question is — is there such markup?

What I would like to achieve:

  • having words on a page, one after another, no spaces (in sense of character) between,
  • words should be recognized by browser as separate words, so double click on any of them should select given word, not entire sequence,
  • the solution should not force multiple lines in output (like raw div).

Of course I would prefer a tag which semantically describes the notion of “word”, but as I see my chances are slim.

As for div I tried styling it to inline mode, but then Firefox treats all words as one entity, and double click selects them all.

1

LEAVE A COMMENT