4 ms·
HTML is how I write. I struggled with Markdown (and various other mark up formats) for a long time, until I realised that, for me, nothing beats plain HTML for
by MrVandemar 3y ago
HTML is how I write.
I struggled with Markdown (and various other mark up formats) for a long time, until I realised that, for me, nothing beats plain HTML for simplicity and expressive power.
I now use HTML the way people generally use markdown: as an open, easy to read, easy to write, plain-text format for taking notes, writing articles, expressing thoughts, and so on.
I didn't really choose HTML, I just sort of noticed that I was using it. It seems like an unconscious decision, like a river flowing downhill, finding its own path.
Most used tag would be <p>, because I write a lot of essays and things with paragraphing. As well as other structural elements such as headings and lists, I lean into <time>, <cite>, <abbr> a lot.
I tend to use the 'optional' form. I don't close <p>'s and <li>'s unless required.
- the_gipsy 3y agoI really love Elm's way of writing html. It's like writing html without closing tags, just indentation.
- rudasn 3y agoCheck out haml. Quite similar approach I think.
- nikolaplejic 3y agoNot equivalent, but arguably more useful for manual authoring: Emmet [0] was all the range a while back, and I still use it to write HTML. It comes naturally if you're used to writing CSS-like selectors, and mostly gets out of the way. DSL-wise, I've rather enjoyed Clojure's Hiccup [1]. [0] https://emmet.io/ https://emmet.io/ [1] https://github.com/weavejester/hiccup https://github.com/weavejester/hiccup
- naniwaduni 3y agoWhen writing html for documents and not as code, indenting everything really lost its luster to me, it's really nice to have the content root flush with the left margin.
- Akronymus 3y agoFor me personally, elmish offers even better usability. But thats probably down to simple familiarity.
- pests 3y agoThe optional form is weird looking coming from the XHTML era where we were trained on the auto-closing form. Looking up elements that support no closing tag: html, head, body, p, li, dt, dd, option, thead, th, tbody, tr, td, tfoot, colgroup Makes sense if you think about it. Basically everything is pretty well defined and its obvious what next tag should close the context. <td> for example obviously ends when you come across another <td>, another <tr>, or the required </table>
- pbhjpbhj 3y ago><td> for example obviously ends when you come across another <td>, another <tr>, or the required </table> // Only a madman would nest tables!! /me crying in 2000's web design.
- pests 3y agoNope, nesting works! The required ending tag on table means any nested table will open a new context and then any <tr> or <td> will now scope to that table and will until the second tables closing </table>. <table> <tr> <td> <table> <tr> <td> table-cell-inside-table </table> </table>
- MrVandemar 3y agoI lived through the XHTML era; when I was doing web-design I adopted it for many projects. It just seemed right to rigorously enforce a formal approach, and I suspect it reduced errors. Took me a long time to train myself out of <br/> afterwards though. But the optional-style works I think for writing. Especially if you're just writing a document. If you don't have site-menus, a search bar, social-media sharing icons, javascript libraries and all the other paraphenalia and page-furniture of a website, then you are left with a lean and structured file.
- foobarbecue 3y agoYou mean </br>, presumably.
- brainzap 3y agobut how do you do images or video, they need some extra magic work
- MrVandemar 3y agoI'm not sure I understand your question. <img> is the tag you use for an image, and there are tags to embed video.
- brettermeier 3y agoYes, it's really simple. And if he meant sizing, "height" and "width" parameters still work in an img-tag: <img src="img.png" height="100px"> (also the other parameter is set to "auto" automatically, at least in Firefox)
- erhaetherth 3y agopretty sure you're not supposed to use px in the height attribute. they are pixels. the width will be set to match the aspect ratio but your browser will have to DL the image first. which probably doesn't matter unless you have content to the left/right of it, then it'll get bumped when the image loads. layout shift is a nasty thing.
- brettermeier 3y agoBut you can do it and it works. And because it's about taking quick notes, it's not really about the beauty of the layout or layout shifts, isn't it?
- kome 3y ago<img>? <video>? but i'm not sure if i understand the question...
- GoblinSlayer 3y agoIn web 2.0 everything is done by javascript.
- SPBS 3y ago<a href="">links</a> are such a pain to write though. Probably the biggest annoyance when I write in raw html.
- adrianmsmith 3y agoBut is [abc](http:// http://...) any better? I can never remember which brackets to use, and I've been using Markdown for years now. I never have a problem remembering the HTML syntax.
- alanbernstein 3y agoIMO, yes, it is so much more concise that it is worth memorizing. https://mtsknn.fi/blog/how-to-remember-markdowns-link-syntax/ https://mtsknn.fi/blog/how-to-remember-markdowns-link-syntax... Think of it as a function call (mnemonically, it doesn't need to make sense conceptually).
- fabianholzer 3y agoMy problem exactly. My memory seems not to work well for symbols which rely mostly on position. Is it URL first or link text first, and do I put the URL in round or square brackets? Same with formatting: Is the first * italics or bold? I can remember <i> and <b> much better, and will trade off a bit of verbosity for not straining my memory anytime.
- umpalumpaaa 3y agoEasy trick to remember it: [Button](url) The [ and ] are ascii art for a button - in between goes what is clickable (title) and then comes the url.
- MrVandemar 3y agoThe lack of internal consistency, especially the link syntax, has always been something I struggled with with Markdown. But that's about the first sensible way to remember it that I've seen.
- 3y ago
- theandrewbailey 3y ago10 years ago, I got frustrated adding in all the closing tags for my blog's articles, so I implemented Markdown. It made writing long articles so much easier that I wouldn't dare go back and wonder why I waited so long to do it.
- lenkite 3y agoHow do you create TOC ? Navigation bars ?
- MrVandemar 3y agoThere's a difference between a web-site and a document. When you fire up a word-processor do you produce a document with "navigation bars". As for TOC, I've never written anything that strictly needs one. I do have "hxtoc" on my laptop, but I've never needed it. I do publish some of my writing to my website, and I discuss the minimal tooling I use here: https://brett.coulstock.id.au/site-colophon.html https://brett.coulstock.id.au/site-colophon.html