Home > Web Front-end > HTML Tutorial > What is the correct way to use ',', ';' or ':' in HTML?

What is the correct way to use ',', ';' or ':' in HTML?

WBOY
Release: 2023-08-29 18:17:05
forward
730 people have browsed it

What is the correct way to use ,, ; or : in HTML?

There are several correct ways to use the br tag in web documents.

In HTML, use the
tag for line breaks. We don't need to close
since it's an empty tag. To break a line, use
or
.

However, the
tag is used in other web documents such as XHTML. However, the
tag must have a space before the trailing /> as it helps XHTML render existing HTML user agents.

grammar

Text <br> text
Copy after login

The following are examples...

Example: (use
)

In the example below, we use the
tag to allow line breaks.

<!DOCTYPE html>
<html>
<body>
   <p>If you want to break a line <br> in a paragraph, <br> use the BR element in <br> your HTML document.</p>
</body>
</html>
Copy after login

When executed in the above script, the text after the tag
will be automatically terminated and added to the next line.

Example: (Use
)

In the example below, we use the
tag to allow line breaks.

<!DOCTYPE html>
<html>
<body>
   <p>If you want to break a line <br/> in a paragraph, <br/> use the BR element in <br/> your HTML document.</p>
</body>
</html>
Copy after login

When the script is executed, the text after the tag
will be terminated and added to the next line.

The above is the detailed content of What is the correct way to use ',', ';' or ':' in HTML?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
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