Home  >  Article  >  Web Front-end  >  What does auto mean in html

What does auto mean in html

WBOY
WBOYOriginal
2021-12-30 17:13:4516767browse

In HTML, auto means "adaptive" and is the default value of many style attributes; when no specified style attribute is set for an element, the default value of the attribute is "auto", indicating that the element The specified style is adapted to the browser.

What does auto mean in html

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

#What does auto mean in html

auto means automatic adaptation.

is the default value of many css style properties.

For example:

margin:0 auto

means that the top and bottom margins are 0, and the left and right margins are auto, which means automatic adaptation.

If no value is set for the attribute in CSS, the browser client will take the initial value of the attribute for rendering, which is based on browser adaptation.

Examples are as follows:

<div class="center">居中</div>
<style type="text/css">
.center{
    width:200px;
    height:200px;
    margin:0 auto;
    background-color:yellow;
}
</style>

Recommended tutorial: "html video tutorial"

The above is the detailed content of What does auto mean in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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