This is a bit like the Chain Tutorial in the pgfmanual. It is best to specify text height and text depth for the nodes in this case. For example as follows:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzset{every node/.style={anchor=base,scale=0.5,draw,thick,blue,
text height=1.7ex,text depth=0.3ex, minimum width=1em}}
Some text
(\tikz[baseline]{\node {a};}),
(\tikz[baseline]{\node {d};})
More demonstration
(\tikz[baseline]{\node {a};}\tikz[baseline]{\node {d};}%
\hbox to 0pt{\hss\tikz{\draw[very thin,red] (0,0) -- (4cm,0);}})
\end{document}
I have specified anchor=base for the nodes, so the baseline of the text in these nodes lies on the x-axis. Then it is sufficient to just pass the plain baseline option to \tikz for the vertical alignment.
In general, you can set baseline to some vertical dimension to shift material

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzset{every node/.style={anchor=base,draw,thick,blue,
text height=1.7ex,text depth=0.3ex, minimum width=1em,scale=0.5}}
Some text
\tikz[baseline]{\node {a};}
\tikz[baseline=0.1ex]{\node {a};}
\tikz[baseline=0.3ex]{\node {a};}
\tikz[baseline=0.7ex]{\node {a};}
\tikz[baseline=1ex]{\node {a};}
\tikz[baseline=2ex]{\node {a};}
\tikz[baseline=4ex]{\node {a};}
\tikz[baseline=-0.3ex]{\node {a};}
\tikz[baseline=-0.5ex]{\node {a};}
\tikz[baseline=-1ex]{\node {a};}
\tikz[baseline=-2.5ex]{\node {a};}
\tikz[baseline=-4ex]{\node {a};}
for a dance.
\end{document}
or use a node as in the linked question.
I have specified dimensions in terms of ex and em units which reflect the size of the font used, rather than absolute units such as cm.
baselineoption to do this. – Andrew Swann Apr 25 '13 at 15:59Some text (\tikz[baseline=(O.base)]{\node (O) [scale=0.5,solid,draw,thick,blue,rectangle,fill=white,minimum height=0.5cm,minimum width=0.5cm] {a};}), (\tikz[baseline=(O.base)]{\node (O) [scale=0.5,solid,draw,thick,blue,rectangle,fill=white] {d};}) and some moreThe two blue boxes are not aligned though... – Markus Apr 25 '13 at 16:09