How to Insert HTML Into Drupal

Shares & Saves

Drupal only accepts a limited number of HTML tags by default, such as the <strong> tag to produce bold text, and the <blockquote> tag to produce block quotes. This poses a problem if you want to insert advanced HTML into a node or content block. Fortunately, the text format selector lets you enable full HTML so you can insert HTML into Drupal nodes and content blocks.

Inserting HTML into a Node

  • Click on "Dashboard," then "Add Content." Select the node type you want to create and add HTML to.

  • Scroll beneath the "Body" entry field. You'll see "Text Format." Click on it.

  • Select the "Full HTML" option. This enables the use of HTML in the node.

  • Type or paste the HTML code into the content box. Give the node a title and click "Save."

Inserting HTML into a Content Block

  • Click on "Dashboard," then "Structure." Click on "Blocks."

  • Click on "Add New Block" to add a new content block.

  • Title the block, or type <notitle> to leave it blank.

  • Type or paste your HTML into the "Body" field.

  • Scroll down to the "Text Format" selector. Choose "Full HTML" to enable the HTML in the content block. Click "Save."



Read Article

Your Black Friday/Cyber Monday Survival Guide