html a link tag title attribute line break mouse hover prompt content line break effect

html a link tag title attribute line break mouse hover prompt content line break effect
The method of wrapping the content (title attribute content) when the mouse hovers over the object, summary of the html title wrapping method.

The title attribute of HTML displays one line by default. How to wrap the line? Here DIVCSS5 summarizes and introduces two line wrapping methods for everyone to share and use.

1. Directly wrap the title content

When filling in the title content directly, press the "Enter" key to wrap the line. The sample code is as follows:

Copy code
The code is as follows:

<a href='https://www.jb51.net' target='_ablank'
title='Title: DIVCSS5
Author: DIVCSS5
Updated: 2013-05-17
Recommended level: None Keywords: title line break Pagination: No pagination Reading level: Normal'>html title attribute line break</a>

Browser effect screenshots:

Screenshot of the effect of moving the mouse to the link text a prompting the content to wrap

2. Use HTML title line break code

There are two types of code for line breaks, both of which can achieve line breaks when the title content in the html tag is displayed.

1. The line break codes are as follows:
"&#10;" and "&#13;"

"&#10;" spelling:

& (and symbol, keyboard number key 7 together &) + # (pound sign) + 10 (Arabic number ten) + ; (lowercase semicolon)

"&#13;" spelling:

& (and symbol, keyboard number key 7 together &) + # (pound sign) + 13 (Arabic number thirteen) + ; (lowercase semicolon)

The above digital input must be entered in half-width English format. When using, just select any one (group) of line break symbol codes where a line break is required.

2. The sample code is as follows:


Copy code
The code is as follows:

<a href="https://www.jb51.net"
title="First row&#10;Second row&#10;Third row">title line break 1</a>
<a href="https://www.jb51.net"
title="Explanation 1&#13;Explanation 2&#13;Explanation 3">title line break 2</a>
<!-- HTML comment: In order to make the screenshot complete, the code is wrapped here-->


3. Example screenshots



Example code screenshot



When the mouse moves to the hyperlink, the title attribute content is displayed to achieve line break display effect diagram

<<:  Better looking CSS custom styles (title h1 h2 h3)

>>:  Summary of 6 skills needed to master web page production

Recommend

User needs lead to marketing-oriented design

<br />For each of our topics, the team will ...

How to redirect to https through nginx load balancing

Copy the certificate and key on the web scp -rp -...

HTML hyperlinks explained in detail

Hyperlink Hyperlinks are the most frequently used ...

Detailed explanation of mysql user variables and set statement examples

Table of contents 1 Introduction to user variable...

Simple tutorial on using Navicat For MySQL

recommend: Navicat for MySQL 15 Registration and ...

Semanticization of HTML tags (including H5)

introduce HTML provides the contextual structure ...

js canvas realizes circular water animation

This article example shares the specific code of ...

Bootstrap 3.0 learning notes button style

This article mainly explains the style of buttons...

Installation and configuration method of vue-route routing management

introduce Vue Router is the official routing mana...

HTML left and right layout example code

CSS: Copy code The code is as follows: html,body{ ...

MySQL restores data through binlog

Table of contents mysql log files binlog Binlog l...

Docker solves the problem that the terminal cannot input Chinese

Preface: One day, I built a MySQL service in Dock...

Sample code for generating QR code using js

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