Home > Web Front-end > HTML Tutorial > What does the width of html mean?

What does the width of html mean?

醉折花枝作酒筹
Release: 2023-03-06 15:12:48
Original
19304 people have browsed it

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.

What does the width of html mean?

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:

What does the width of html mean?

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>
Copy after login

Effect:

What does the width of html mean?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template