set title page to h1 in yii2?
in view :
$this->title = 'title' ;
and source code :
<title>title</title>
set title page to h1 in yii2?
in view :
$this->title = 'title' ;
and source code :
<title>title</title>
In view the value is assigned to $this->title for the use in head and if useful in user view
<?php
$this->title = $model->id;
?>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My Title </title> <!-- this is for SEO -->
...
</head>
<body>
<h1><?= $this->title ?> </h1> <!-- this is for user view -->