I know span
strong
and em
. Are there any others?
I'm trying to filter a text which goes inside a link, and need to know what elements should I leave unfiltered?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- React Native Inline style for multiple Text in sin
Other inline tags should be legal inside
<a>
like<img>
,<abbr>
, etc. Here's alist of all the inline tags:http://en.wikipedia.org/wiki/Inline_tag#Inline_elements
Also, since
<a>
is a body tag, inline body tags only inside it, please.It is worth to mention that "block-level links" are valid in HTML5.
If you're using XHTML transitional, then
font
,b
,i
,sub
,sup
....AFAIK just about any inline tag (except for another link) will fit.According to the DTD, lots of elements:
For HTML 4.01 Transitional, for instance, you can pick the DTD from w3c site. Then search the
<!ELEMENT A
in the document and navigate the entities, like%inline;
to know the allowed nested elements.#PCDATA
is allowed.%inline;
and%fontstyle;
:TT | I | B | U | S | STRIKE | BIG | SMALL
%inline;
and%pharse;
:EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM
They will, in turn, have other nested elements.
You can repeat the operation for other HTML DTDs.
To know how DTDs nesting rules work, I suggest to read a tutorial.