Where can I find the default `display` style attribute for an HTML tag?

For example, I wasn't sure what the display

default style attribute for a tag <img>

( inline

or block

or inline-block

) was. So I tried to find this information in the img term of MDN document . But I haven't found if this is inline

or block

in the MDN doc.

Does anyone have any ideas on where I can find this information?

Is there any official / canonical documentation to describe this?

Thank!

+3


source to share


2 answers


The display

default style attribute of the display

tag <img>

and is referenced in this MDN document for inline elements.

The following elements are "inline":

  • b, big, i, small, tt
  • abbr, abbreviation, cite, code, dfn, em, kbd, strong, samp, var
  • a, bdo, br, img, map, object, q, script, span, sub, sup
  • input, label, selection, textarea


Hope it helps!

+1


source


the img tag is inline by default.

You can check the link for reference.



These are the sample default stylesheets proposed by the W3C in the CSS 1 , CSS 2 and CSS 2.1 specifications.

+2


source







All Articles