style title html code example
Example 1: how to stilize title property css
[data-title]:hover:after {
opacity: 1;
transition: all 0.1s ease 0.5s;
visibility: visible;
}
[data-title]:after {
content: attr(data-title);
position: absolute;
bottom: -1.6em;
left: 100%;
z-index: 99999;
visibility: hidden;
white-space: nowrap;
background-color: #00FF00;
color: #111;
font-size: 150%;
padding: 1px 5px 2px 5px;
box-shadow: 1px 1px 3px #222222;
opacity: 0;
border: 1px solid #111111;
}
[data-title] {
position: relative;
}
Example 2: change the title in html using
document.title = "My New Page Title";
Example 3: html title attribute
<head>
<title>This is your webpage title</title>
</head>