Home > Article > Web Front-end > What does the width of html mean?
In HTML5, width means width. The width attribute defines the width of the element's content area. You can add inner margins, borders, and outer margins outside the content area. You only need to set "element {width:" to the element. Value}" will do.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
width means width, which is an attribute in CSS used to set the width of an element.
The width attribute defines the width of the element's content area. Padding, borders and margins can be added outside the content area; inline non-replaced elements will ignore this attribute.
Note: The width attribute does not include padding, borders and margins! All major browsers support the width attribute.
Attribute value:
Instance:
<html> <head> <style type="text/css"> img { width: 50% } </style> </head> <body> <img src="/i/eg_smile.gif" / alt="What does the width of html mean?" > </body> </html>
Effect:
Recommended learning: html video tutorial
The above is the detailed content of What does the width of html mean?. For more information, please follow other related articles on the PHP Chinese website!