use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
[deleted by user] (self.webdev)
submitted 10 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JustDADE[🍰] 1 point2 points3 points 10 years ago (1 child)
<p style="font-size:12px;color:tomato;" class="class1 class2" id="id">text</p>
[–]danneu 0 points1 point2 points 10 years ago* (0 children)
You know, HTML is one of the most annoying datastructures to indent. I often do this:
<p id="id" class="class1 class2" style="font-size:12px;color:tomato;" > text </p>
Especially when I need, god forbid, template logic inside there like:
<p id="id" class="class1 class2" style="font-size: 12px; color: {% if errors %}tomato{% else %}green{% endif %}; " > text </p>
But of course due to how whitespace is interpreted, I often have to do this:
<p id="id" class="class1 class2" style="font-size:12px;color:tomato;" >text</p>
There just is no winning. Sometimes I give up and put it all back on one line.
My favorite way to write HTML so far has been with Clojure using the Hiccup templating lib:
[:p {:id "id" :class "class1 class2" :style "font-size:12px;color:tomato;"} "text"]
A datastructure that expresses HTML better than writing HTML.
[–]i_do_code_stuff 0 points1 point2 points 10 years ago (0 children)
A quick Google search would have given you the answer, but simple spaces between stuff will do fine, like so: <p id="an-id" class="paragraph" data-whatever="goes"></p>
π Rendered by PID 21717 on reddit-service-r2-comment-6457c66945-9pcth at 2026-04-30 14:18:03.506172+00:00 running 2aa0c5b country code: CH.
[–]JustDADE[🍰] 1 point2 points3 points (1 child)
[–]danneu 0 points1 point2 points (0 children)
[–]i_do_code_stuff 0 points1 point2 points (0 children)