reddit / emacs

HTML Tags and Attributes Reference Manual / Cheat Sheet / Eldoc for Emacs

digikar · 2022-07-20 13:48
Hi! I'm not a web-developer, but I occasionally use emacs for writing HTML. I've been far from memorizing the tags and attributes in HTML - with programming languages, I don't memorize the parameter list :/. So, I usually have an idea of what I want to do in HTML, but need to resort to googling/duckduckgo-ing quite frequently. However, I felt, it would be pretty great if there were some mode / emacs-extension / some-eww-friendly-website that could provide the tags, and the attributes that each tag takes, may be along with small examples as well as "see also". I've tried `company-web` and `lsp-mode`, and both provide descriptions of tags (which I mostly don't need!) but don't provide the attributes. With other languages, it is a great help to see the parameter list in the echo area, or even the function/macro/keyword documentation with a simple command. So, if anyone knows about this, it'd be great! Thanks you! EDIT: Moments after I posted this, yasnippet struck me; and it is helpful, but the tag-attribute reference manual would still be appreciated!
akirakom · 2022-07-20 13:59
For referencing CSS, I'm maintaining mnemonics in an Org file. Actually, I have a myriad of per-language(mode) note files, but CSS is the most frequently used one. For CSS, you would want to reuse snippets from many sources, so this idea turns out to be useful. Radio targets are also effective here. There is a package for dash docs. I personally prefer the Org mnemonic in many situations, but it can be useful. Also note that DuckDuckGo supports [bangs](https://duckduckgo.com/bang), and you can search from a particular category in MDN using an annotation like `!mdncss`. It is convenient to integrate DuckDuckGo with Emacs.
mkleehammer · 2022-07-20 20:44
You may also like devdocs, which provides an Emacs interface to devdocs.io. Once you download a docsset, it caches it locally and allows you to lookup items very quickly and displays the pages in Emacs' eww web browser.