Emacs: Insert HTML Tag

By Xah Lee. Date: . Last updated: .

This page show you how to insert HTML tags. using Emacs: Xah HTML Mode

To insert a tag, press Tab (xah-html-wrap-html-tag)

xah html mode insert tag 2021-06-06
xah html mode insert tag

If there is a text selection, it'll wrap the tag around it.

xah-html-wrap-html-tag is the general way to insert any html tag. But there are many other more convenient ways to create tags , by turning lines to list, table, etc. Or, turn multiple text blocks to paragraphs with p tag. For example:

and there are many commands to create links. For example:

xah-html-any-linkify
Make current path into a link. The exact link format depends on the file or url type. (image, video, audio, Wikipedia, local file, etc.)
xah-html-file-linkify
Create local file link.
xah-html-source-url-linkify
Create url link with date.
xah-html-wikipedia-url-linkify
Create Wikipedia link (link text is Wikipedia title instead of url).
xah-html-word-to-wikipedia-linkify
Turn a word into a Wikipedia link.
xah-html-image-linkify
Create embedded image.
xah-html-image-figure-linkify
Create embedded image with figure and caption tag.
xah-html-image-to-link
Create image link with image file name as text.
xah-html-audio-file-linkify
Create audio file link.
xah-html-video-file-linkify
Create video file link.
xah-html-pdf-linkify
Create pdf file link.
xah-html-pdf-embed-linkify
Create embedded pdf.
xah-html-youtube-linkify
Create embedded YouTube.
xah-html-css-linkify
Create CSS stylesheet link.
xah-html-javascript-linkify
Create script tag link for JavaScript file.

HTML

Tags

Links

CSS

Misc

If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial