A brief discussion on HTML titles, paragraphs, line breaks, horizontal lines, and special characters

A brief discussion on HTML titles, paragraphs, line breaks, horizontal lines, and special characters

title

XML/HTML CodeCopy content to clipboard
  1. < h1 > First level title </ h1 >   
  2. < h2   align = "alignment " > Secondary title </h2>   

There are three alignment modes: left, center, and right. The default is left.

paragraph

End of paragraph tag'

'Can be omitted, a new paragraph start mark means the end of the previous paragraph

XML/HTML CodeCopy content to clipboard
  1. < p > Paragraph text </ p >   

Line Break

Before the end of this paragraph, <br>break the line

No line break

When a paragraph is very long, the browser will generally automatically wrap it. If you don't want the browser to do this, you can use the <nobr> tag

<nobr>No matter how long this sentence is, the browser is not allowed to wrap it automatically</nobr>

Horizontal Line

Use <hr> to insert a horizontal line in a web page

Insert special symbols

&nbsp;No line break space
&emsp;Full-width space
&ensp;Half-width space
&quot;
&amp;&
&lt;
>
&times;×
&sect;§
&copy;©
&reg;®
&trade™

example

XML/HTML CodeCopy content to clipboard
  1. <!doctype html >   
  2. < html >   
  3.      < head >   
  4.          < meta   http-equiv = "content-type"   content = "text/html; charset=utf-8"   
  5.          < meta   name = "description"   content = "Set page description" >   
  6.          < title > Tag 1 </ title >   
  7.      </ head >   
  8.      < body >   
  9.          < h1 > Title </ h1 >   
  10.              < hr >   
  11.              < nobr > There is no paragraph mark. The next paragraph starts where this paragraph ends. There is no paragraph mark. The next paragraph starts where this paragraph ends. There is no paragraph mark. The next paragraph starts where this paragraph ends. There is no paragraph mark. The next paragraph starts where this paragraph ends. </ nobr >   
  12.              < p   align = "right" > This paragraph is aligned to the right < br > This paragraph is aligned to the right
  13.              < p   align = "center" > This section × is centered
  14.      </ body >     
  15. </ html >   

Output effect:

The above brief discussion on HTML titles, paragraphs, line breaks, horizontal rules, and special characters is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

<<:  Independent implementation of nginx container configuration file

>>:  10 tips for designing useful, easy-to-use web applications

Recommend

Build Tomcat9 cluster through Nginx and realize session sharing

Use Nginx to build Tomcat9 cluster and Redis to r...

Vue implements the browser-side code scanning function

background Not long ago, I made a function about ...

js to implement verification code interference (dynamic)

This article example shares the specific code of ...

Sample code for generating QR code using js

Some time ago, the project needed to develop the ...

Differences between ES6 inheritance and ES5 inheritance in js

Table of contents Inheritance ES5 prototype inher...

How to turn off eslint detection in vue (multiple methods)

Table of contents 1. Problem Description 2. Probl...

MySQL executes commands for external sql script files

Table of contents 1. Create a sql script file con...

js, css, html determine the various versions of the browser

Use regular expressions to determine the IE browse...

javascript input image upload and preview, FileReader preview image

FileReader is an important API for front-end file...

HTML multi-header table code

1. Multi-header table code Copy code The code is a...

MySQL 8.0.15 installation and configuration method graphic tutorial

This article records the installation and configu...

Installation, configuration and use of process daemon supervisor in Linux

Supervisor is a very good daemon management tool....

Vue implements adding watermark effect to the page

Recently, when I was working on a project, I was ...