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
WBOYforward
2023-08-29 18:17:05731browse

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

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>

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>

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete