Default img display type (#19421)

* Default img display type

Added info about how img elements are rendered for display type by default.

* Update index.md
This commit is contained in:
Ninjirate
2018-10-16 00:06:04 -05:00
committed by Quincy Larson
parent db3528dd79
commit c1d5ad8aa8

View File

@ -2,10 +2,9 @@
title: CSS Images title: CSS Images
--- ---
## CSS Images ## CSS Images
<p>This helps in adding an image to a website.</p> This helps in adding an image to a website.
#### Code Sample
####Code Sample</h4>
```<img src="picture.jpg" alt="Picture" width="100" height="100">``` ```<img src="picture.jpg" alt="Picture" width="100" height="100">```
@ -14,6 +13,14 @@ title: CSS Images
* **width:** This specifies a width for the image(can be percent or px or auto)</li> * **width:** This specifies a width for the image(can be percent or px or auto)</li>
* **height:** This specifies a height for the image(can be percent or px or auto)</li> * **height:** This specifies a height for the image(can be percent or px or auto)</li>
#### CSS Defaults
The `img` element will be rendered by default in most browsers to be displayed as an inline-block display type unless specified otherwise.
```
img {
display: inline-block;
}
```
#### More Information: #### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article --> <!-- Please add any articles you think might be helpful to read before writing the article -->