Advertising sustains the DA. Ads are hidden for members. Join today

How to use HTML Title Module

Last updated on
29 November 2022

This documentation needs review. See "Help improve this page" in the sidebar.

  1. Go to admin/config/user-interface/html_title and mention the element tags that you want to use in your title field like div, span, etc. 
    NOTE: If you don't mention the elements then you won't be able to use them. 
  2. Click on save configuration button.
  3. After that, edit any content and add element to Title field. E.g.
    <div>My Title</div>
  4. Can also add class in title field e.g.
    <div class="title">My title</div>
  5. Inspect the the title field after saving the changes and you will notice that My Title is wrapped in <div> element.

NOTES:  

  • This module is used when the node template is rendering page title field. Without this module, the element tags will also get rendered with title value.  
  • Don't forget that for this to work you need to go to the "Manage Display" tab of the content type and select the "HTML-title text" format for the title field.

Help improve this page

Page status: Needs review

You can: