Introduction to the difference between html
and

黄舟
Release: 2017-06-20 14:30:26
Original
2495 people have browsed it

Is the align=left of image text body table tr th td music etc. the same as center? Do these basic elements have both methods? Does music have alignmentproperties?
tr td th is centered relative to the table. Others are centered relative to the body?
And the image is centered relative to the text (compared with the text), right? When the image is used alone, there is no "align=", right?
There is no other text in the body, right? font align=> "body align=" is not right either?
align=left Is it okay if left is left without quotation marks?

The relationship between align and center in HTML is: align is a tag in HTML that sets the alignment of text or images, and center is an attribute value of align, which means centering, so One is a label and the other is an attribute value, and center is the attribute value of align.

align: It is a tag that defines the alignment of text or images one by one. Its common attributes are: left (left alignment), right (right alignment), center (center)

For example:

<html>
<body>
<p align="left">这是一段左对齐文字</p>
<p align="right">这是一段右对齐文字</p>
<p align="center">这是一段居中对齐文字</p>
</body>
</html>
Copy after login

The effect is as follows:

Introduction to the difference between html <center> and <align>

align is the alignment attribute. Its value can be left, center, or right, which means left, center, or right respectively. The effect will definitely be different. Of course, if the content to be aligned is the same size as the container, such as the width of the image you add in Introduction to the difference between html <center> and <align> It is the same as the window, so there is no difference in alignment, otherwise there is a difference.

Many have alignment attributes such as table, p, div, etc., but not all of them can. Specifically which elements support align, I suggest you don’t memorize it. Write it in when needed and see if it doesn’t work. Just think of other methods (such as putting a container outside that supports align, such as

)

The above is the detailed content of Introduction to the difference between html

and . 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