search
HomeWeb Front-endHTML TutorialDetailed explanation of the use of title tags and paragraph tags in XHTML_HTML/Xhtml_Web page production

XHTML Title Overview
When we write Word documents, we often use titles, such as "Chapter 1", "1.2.1", etc. There is also the concept of title in XHTML syntax. Six levels of headings are defined in XHTML, from

to

:
XML/HTML CodeCopy content to clipboard
  1. h1>First level titleh1>
  2. h2>Second level titleh2>
  3. h3>Third level titleh3>
  4. h4>Fourth level titleh4>
  5. h5>Fifth level titleh5>
  6. h6>Sixth level titleh6>

The use of titles
In XHTML documents, titles are very important. Search engines use titles to index the structure and content of your web pages. We must be good at using titles to identify our document hierarchy.
Among the titles, the first level titles are the highest, and then decrease in sequence. Generally speaking, in XHTML documents, the title applies to the following places in the document (within the

tag):
According to the website level:

Define the website title

Define article titles
According to website content:

Define website titles

Define article titles
Define column titles
For h4 to h6 titles larger than h3, you can choose them in appropriate places, such as copyright statements or disclaimer notices and other relatively important places.
Please also note that the levels must be decreasing. The level below h1 should be h2, and then h3...


Some suggestions for using titles
Since h1 represents the core content of the entire page, generally h1 can only appear once (this is not absolutely the case, but it must not appear multiple times) and used in the most emphasized part of the article. Therefore, for specific content pages, h1 is often used in article titles to highlight the importance of the article, such as this site:

XML/HTML CodeCopy content to clipboard
  1. h1>XHTML Titleh1> 

Whether h1 will be used in the website title (website logo) at this time will depend on the actual situation.
Title usage practice
Open our learning document 1.html file with an editor, copy the above

to

tags into the tag:
XML/HTML CodeCopy content to clipboard
  1. body>
  2. h1>First level titleh1>
  3. h2>Second level titleh2>
  4. h3>Third level titleh3>
  5. h4>Fourth level titleh4>
  6. h5>Fifth level titleh5>
  7. h6>Sixth level titleh6>
  8. p>hi~Hello! p>
  9. body>

Save and open the 1.html file with a browser (if it is already open, click the browser refresh button to reload the document, the same below, no further description), you can view the effect of the title tag as follows:
201636113918682.gif (396×290)

As you can see from the example, the browser will automatically form a line break for a title (each title has its own line).

Paragraph p tag
In XHTML, paragraphs are defined through the

tag.
XHTML Paragraph
Paragraph tag example:
XML/HTML CodeCopy content to clipboard
  1. p>This is a paragraph. p>

In actual production work, we use

paragraph tags extensively.
After adding a paragraph tag to the text, the browser will automatically add a paragraph break to the text. But instead of relying on the empty

to form a blank line, we should use the
line break tag.


Line break

In XHTML documents, the title or paragraph tag only provides a line break mark. If we need a blank line or multiple line breaks, we need Newline tag
. In XHTML, hitting the Enter key to break a new line when editing Word is invalid, and the browser will ignore the new line gap generated in this way.
Example:

XML/HTML CodeCopy content to clipboard
  1. p>Here are some contentsp>
  2. br /> br />
  3. p>This is some other contentp> 

Since the line break tag only informs the browser that a line break is needed in this place without any substantive content, this tag does not appear in pairs, and a
only breaks the line once. If multiple line breaks are needed, please enter Multiple
tags.
If the
tag is inserted into

, it will also produce a line break effect.



or
?
Although we can still achieve line breaks using
, that is the result of the browser being compliant with the HTML4.0 specification.
In the XHTML specification, for tags that are not paired, you only need to add a space after the end of the content, and then use /> to close the tag, such as
and Detailed explanation of the use of title tags and paragraph tags in XHTML_HTML/Xhtml_Web page production and other tags.
So
instead of
or
.

Statement
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
html怎么段落空两格html怎么段落空两格Mar 27, 2024 pm 04:39 PM

html段落空两格的方法:1、使用CSS的text-indent属性;2、使用CSS的padding-left属性;3、使用非断行空格或全角空格;​4、使用“pre”标签或white-space属性。

word文档段落之间空出一大段空位,怎么弄掉word文档段落之间空出一大段空位,怎么弄掉Mar 19, 2024 pm 10:07 PM

在word软件里对文档进行操作的时候,有时发现文档段落之间有一大片空位,不知道大家遇到过这种情况没有,出现这种情况我们就要把空位删除掉呢?下面就和小编一起来看看下面的操作,你就知道了。1、我们找到需要删除一大段空白页的文字尾端,如下图所示。  2、随后点击界面上方的间距按钮,如下图所示。  3、再弹出的下拉菜单中点击【删除段落后的间距】按钮,如下图所示。  4、对于段落后面空行不是特别多的话,还有一种比较简单的方法,就是把空白段落选中,然后点击delete键删除,这样也可以删除段落后面的空白行,

PPT文件标题不能删除的处理操作方法PPT文件标题不能删除的处理操作方法Mar 26, 2024 pm 03:21 PM

1、删除文字当您使用鼠标左键单击文字后,会在文字周围出现许多整齐排列的白色方块,这表示已经选择了该【文本/形状/图形】。一旦选中,只需按下键盘上的【Delete】键,便可轻松删除该文字。2、选不中文字或形状鼠标左键单击【文本/形状/图形】后,没有出现向步骤1中的【选中状态】,出现此类问题原因较多,以母版为例,点击菜单上的【视图】,并找到【母版视图】中的【幻灯片母版】。3、在母版视图中,点击左侧导航的页面,找到需要删除的【文本/形状/图形】后,依旧点击鼠标左键,选中后,按键盘【Delete】删除即

Word 网页版中的段落选项:个性化定制方法详解Word 网页版中的段落选项:个性化定制方法详解Aug 03, 2023 pm 01:37 PM

对于Web用户的Word来说是个好消息。Microsoft今天宣布,WordforWeb中的所有用户现在都可以使用新的段落选项。这些选项允许用户自定义Word中的段落选项及其分页方式。“多年来,段落选项一直是WordforWindows中最受欢迎的功能,”Microsoft的软件工程师IsabelBloger和产品经理JulietDaniel说。也就是说,首先,右键单击要修改的段落。然后,从出现的快捷菜单中,选择“段落选项”。这将打开“段落”对话框。在此对话框中,导航到“分页”部分,然后选择要应

CSS实现标题文字动画效果的方法和技巧CSS实现标题文字动画效果的方法和技巧Oct 20, 2023 am 09:00 AM

CSS实现标题文字动画效果的方法和技巧,需要具体代码示例在网页设计和开发中,动画效果可以提升用户体验,增加页面的吸引力和活力。标题文字动画效果是一种常见的设计手法,它可以让页面的标题更加生动和有趣。本文将介绍一些CSS实现标题文字动画效果的方法和技巧,并提供具体的代码示例。渐变动画效果渐变动画效果可以让标题文字的颜色从一种变化到另一种,创建出流畅的过渡效果。

如何在HTML中的fieldset中包含一个标题?如何在HTML中的fieldset中包含一个标题?Aug 23, 2023 pm 05:01 PM

使用<legend>标签来包含一个标题。HTML<legend>标签用于为<fieldset>标签定义一个标题。它支持以下属性−属性值描述Aligntopbottomleftright已弃用−指定内容对齐方式。示例您可以尝试运行以下代码来实现HTML中的<legend>标签−<!DOCTYPEhtml&g

在HTML5中创建一个隐藏的段落在HTML5中创建一个隐藏的段落Sep 15, 2023 pm 02:29 PM

使用HTML5中的隐藏属性在HTML5中创建隐藏段落,即不再相关的元素。示例您可以尝试运行以下代码来实现HTML5中的隐藏属性-<!DOCTYPEhtml><html>&nbsp;&nbsp;<body>&nbsp;&nbsp;&nbsp;<h2>Heading</h2>&nbsp;&nbsp;&nbsp;<p>Thisisademoparagraphandvi

什么是html和xhtml什么是html和xhtmlSep 15, 2022 pm 05:59 PM

HTML超文本标记语言,是一种基于标记的网页设计语言,专门用来设计和编辑网页。XHTML是为了适应XML而重新改造的HTML,也是一种标记语言,它可以看作是从HTML到XML的过渡;XHTML要求在网页中出现的任何元素都应该被标记出来。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools