What does auto mean in html

WBOY
Release: 2021-12-30 17:13:45
Original
16743 people have browsed it

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

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

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!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!