Suppose we are given a map $f:A \rightarrow B$ between two dg-algebras which are formal.
Is the map $f$ also "formal" in some sense?


More precisely can we find isomorphisms $\phi\_A:A\rightarrow H^\bullet(A)$ and $\phi\_B:B\rightarrow H^\bullet(B)$ in the derived category of dg-algebras such that 


$$H^\bullet(f) \circ \phi\_A= \phi\_B \circ f $$
holds in the derived category of dg-algebras?


I fear that this may be wrong in general. What would be a counter example? Are there criteria which ensure that $f$ is "formal" in this sense?



Morphisms between formal dg-algebras
Let me give you an example which has a topological flavour. Let us consider, the De-Rham complex of differential forms on a sphere $S^n$, we denote it $A^\*(S^n)$, it is a formal commutative differential graded algebra. Let us look at the morphisms of commutative differential graded algebras between $A(S^2)$ and $A(S^3)$ into the derived category.


A good way to compute them is to take a cofibrant replacement of $A(S^2)$, such a cofibrant resolution is given by the algebra $(\mathbb{R}[x\_2]\otimes\Lambda(x\_3),D)$ where the differential satisfies $D(x\_2)=0$ and $D(x\_3)=x\_2^2$.


And as $A(S^3)$ is formal you can replace it by its cohomology algebra which is the exterior algebra $\Lambda(y\_3)$. It is easy to see that a morphism of algebra $\phi$ between these two algebras is completely determined by the image of $x\_3$ thus by a real number $\lambda$ such that $\phi(x\_3)=\lambda.x\_3$. We have proved:
$$[A(S^2),A(S^3)]\_{CDGA}\cong\mathbb{R},$$  

while $H(\phi)=0$.


This example has a topological flavour because it is a way (not the best of course) to show that $\pi\_3(S^2)\otimes \mathbb{R}\cong \mathbb{R}$. 


People in rational homotopy theory have studied the concept of formality for morphisms:


* Vigué-Poirrier, Micheline
Formalité d'une application continue. 
C. R. Acad. Sci. Paris Sér. A-B 289 (1979), no. 16
* Félix, Yves; Tanré, Daniel
Sur la formalité des applications.
Publ. U.E.R. Math. Pures Appl. IRMA 3 (1981), no. 2, exp. no. 1, 45 pp.
* Oprea, John F.
DGA homology decompositions and a condition for formality.
Illinois J. Math. 30 (1986), no. 1, 122–137.


Edit: if you want to play with dgas, then the only thing that you have to change in the example above is the cofibration resolution of the algebra $A(S^2)$. You start with $(T(x\_2,x\_3),D)$ the tensor algeba on $2$ generators with differential $D(x\_2)=0$ and $D(x\_3)=x\_2\otimes x\_2$ it has the same cohomology as $A(S^2)$ until the differential degree $5$ where you have created a new cycle :$[x\_3,x\_2]=x\_3\otimes x\_2-x\_2\otimes x\_3$ which is not a boundary. Then you have to add a generator $x\_4$ to kill this cycle i.e. you put $D(x\_4)=[x\_3,x\_2]$. And so on and so forth, it is easy to check that all the generators you add to $(T(x\_2,x\_3),D)$ in order to build a cofibrant resolution of $A(S^2)$ will have degree at least $4$.


With this resolution in hand you check that a homotopy class of morphism of dgas is also completely determined by the image of $x\_3$. 


