|
1 week ago | |
---|---|---|
pages | 1 week ago | |
posts | 2 weeks ago | |
resources | 1 week ago | |
.gitignore | 1 week ago | |
Makefile | 1 week ago | |
README.md | 1 week ago |
A assorted collection of notes taken on various topics that I find interesting.
This blog aims to be as acessible as it can be, focusing on applying the best practices regarding semantic HTML usage and CSS styling, while also keeping JavaScript usage to an minimum and avoiding it altogheter whenever possbile.
Lastly, this blog primary reason for existing is to allow me to practice creating good web pages, while attemping to use mostly only HTML and CSS.
The macros defined here are meant to only minimally alter the expected style of a HTML document. It is, for example, very simple to define a macro for the headings to save some keystrokes, something like:
define(`\h', `<h$2>$1<h$2>')
\h(Heading text, 1) # A Level 1 heading
But that would visually clash with the rest of the HTML tags style. To make it
more consistent, one would have to define a macro to every single tag. Not only
would that be a lot of work, but it also lead to weird syntax for any tag that
may span multiple lines, like the <p>
tag:
define(`\p', `<p>
$1')
\p(A bunch of text that simply meanders around going nowhere, though that
doesn't matter, since it serves a merely illustrative purpouse.)
That is both syntactically and visually weird, being, at least on the author's opinion, a complete downgrade from just using plain HTML. Also, most text editors worth their salt, already come with the capabilities of defining macros for text insertion. This allows for the programmer to have their own ways of saving keystrokes (on, for example, autoclosing of header tags), while preserving the initial "look and feel" of the HTML document. There are further perks, such as not having to define new syntax highligthing rules and greater user flexibility on how the particular macro works.
When better practices are applied to HTML (taking advantage of optional tags, avoding indentation when possible, etc), it has good enough behaviour that it becomes needless to wrap it around macros or other markup languages, such as Markdown.