dh  = 
       {{0, 0, 0, θ1, 0}, {π/2, 0, 0, θ2, 0}, {
          -π/2, 0, d3, θ3, 0}, {π/2, 0, 0, θ4, 0}, {
          -π/2, 0, 0, θ5, 0}}

TF[a___] := TraditionalForm[a]

T05  =  T[dh,  0,  5];  T05  //  TF