Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

353
Vistas
What is an anonymous inline box?

A website was explaining about something called an "anonymous inline box" and has this example:

<p> Some <em> emphasize </em> text </p>

The block-level box generated by the p element only contains inline elements. The inline box of the text "emphsize" is formed by the <em> tag, so it is not an anonymous box, and the text "Some" and "text" do not have corresponding tags to wrap them, so Surrounding them is the anonymous inline box.

Can I say that any text that is not wrapped inside the tags are anonymous box or is it just true for this situation?

I would appreciate if you could help me understand it a little better.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

So the text your read comes from https://www.w3.org/TR/CSS2/visuren.html#anonymous

9.2.2.1 Anonymous inline boxes
Any text that is directly contained inside a block container element (not inside an inline element) must be treated as an anonymous inline element.

In a document with HTML markup like this: <p>Some <em>emphasized</em> text</p> the <p> generates a block box, with several inline boxes inside it. The box for "emphasized" is an inline box generated by an inline element (<em>), but the other boxes ("Some" and "text") are inline boxes generated by a block-level element (<p>). The latter are called anonymous inline boxes, because they do not have an associated inline-level element.

Such anonymous inline boxes inherit inheritable properties from their block parent box. Non-inherited properties have their initial value. In the example, the color of the anonymous inline boxes is inherited from the P, but the background is transparent.

White space content that would subsequently be collapsed away according to the 'white-space' property does not generate any anonymous inline boxes.

If it is clear from the context which type of anonymous box is meant, both anonymous inline boxes and anonymous block boxes are simply called anonymous boxes in this specification.

There are more types of anonymous boxes that arise when formatting tables.

p {
  background-color: red
}

em {
  background-color: yellow
}
<p> Anonymous inline box #1 <em> inline emphasized box </em> Anonymous inline box #2 </p>

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda