


Is the html p tag a single tag? Introduction to the use of html p tag (example included)
This article mainly introduces the specific usage and some functions of the p tag in HTML. There are examples to explain. Next, let us take a look at this article about the html P tag. Article
First let’s take a look at the html p tag. Is it a single tag?
When you hear this question, you will know that it is a novice who has not used HTML very much, or has never heard of it, because the HTML p tag is one of the most common tags in HTML, including paragraph tags and block-level elements. , is the general introduction of the P tag, starting with
and ending with
. All the text filled in the tag is a piece of text in the browser. display. (If you want to see more, come to PHP Chinese website HTML online course)Let’s look at examples now and explain along the way:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>PHP中文网</title> </head> <body> <p>这里是PHP中文网,这里提供了大量的免费,原创、高清的视频教程,在学习的时候可以直接在线实战。</p><p>这里是PHP中文网, 欢迎你的到来</p> </body> </html>
I added two paragraphs here, with two P tags. The display effect on the web page is as follows:
So let’s not say that P tags appear in pairs. , if you forget the end, the effect will not be readable, and the browser can display it normally, but this violates the provisions of the w3c standard. Also, if you make an error in the browser, in the end you find that it is just How unfair it is that the P tag does not have an end. Therefore, it is better to write the P tag properly and don’t forget to end the tag.
Look again, because the P tag is a block-level element, block-level elements are displayed in a paragraph break in the web page, which is a little different from line break. Normally speaking, line break is also OK, but we must do it formally. There is a line break tag, and its tag is . Yes, this is an element without an end tag. Generally, if there are too many lines in one line, the br tag will appear after that line, and then the following text will be displayed on the next line. Now let’s look at the example
<body> <p>这里是PHP中文网,这</br>里提供了大量的免费,原创、高清的视频教程,在学习的时候可以直接在线实战。</p>这里是PHP 中文网,欢迎你的到来</p> </body>
. A br line break tag is added in the middle. Let’s Let's take a look at the effect:
As shown in the picture, I added a br tag in the middle of "here". We can see that there is no more behind the br. This line is This frees up the space. So usually, there is a lot of text in a paragraph, and we often need to highlight some text. In addition to bolding and italics, we can also try line breaks to make the text highlighted. Can a few words in one line not be highlighted? .
html Summary of the p tag:
The P tag is mainly used in the
tag. Like the news page, it is all paragraphs, so it will be used here. There are many P tags, and many elements can be added to the P tag. I won’t go into them one by one here. The result is that the P tag is one of the indispensable elements in HTML web pages. It has many uses, but the specific Other tags are also needed to assist the beauty and globality of this tag.Okay, the above is the entire content of this article. If you have any questions, you can ask them below.
【Editor's Recommendation】
How to use the insert text ins tag and delete text del tag together in HTML? (With examples)
#What is the html h1 tag? Detailed introduction to the use of html h1 tag
The above is the detailed content of Is the html p tag a single tag? Introduction to the use of html p tag (example included). For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
