It is forbidden to hang tefillin, whether the battim are resting and the straps are hanging, or whether the straps are resting and the battim are hanging, for this is a disgrace when they are hanging in the air. This does not include when, during the donning of the shel rosh, one holds the strap and the shel rosh is hanging in the air and he places it on the head, for this is the necessity of their donning. And likewise during their removal when the straps are hanging, for such is also the manner of their removal. He should only see to it that the straps do not drag on the ground. And likewise, if by chance he holds the tefillin and the straps are hanging—we have no concern with it, for such is their way. But the opposite, to hold the straps and the tefillin are hanging—is forbidden even by chance (see Magen Avraham subsection 1). And likewise it is forbidden to hang them on a peg, whether the tefillin are resting on the peg and the straps are hanging, or whether the straps are resting and the tefillin are hanging. And thus they said in Berakhot (24a): One who hangs his tefillin—his life shall be hanging. Interpreters of verses said: "And your life shall hang in doubt before you"—this refers to one who hangs his tefillin. But if he placed them in a pouch and hung the pouch—it is permitted, for there is no disgrace here. Regarding a Sefer Torah, even in such a manner it is forbidden. And a Sefer Torah requires only resting in an Aron or in a chest (Gemara ibid.). And likewise, siddurim that are hanging by a silver chain—it is forbidden (Magen Avraham subsection 1). And this is when the chain is attached to the siddur, but to place it in a pouch and hang the pouch—it is permitted just as with tefillin (ibid.). And such is the law regarding other holy books.
אסור לתלות תפילין, בין שהבתים מונחים והרצועות תלויות, ובין שהרצועות מונחים והבתים תלוים, דזהו בזיון כשתלוים באויר. ואין בכלל זה מה שבעת הנחת השל ראש אוחזים הרצועה והשל ראש תלוי באויר, ומשימו על הראש, כי זהו צורך הנחתם. וכן בחליצתם שהרצועות תלויות, גם כן דרך חליצתם כן הוא. ורק יראה שהרצועות לא יגרורו על הקרקע. וכן באקראי כשאוחז התפילין, והרצועות תלויות – לית לן בה, שכן דרכן. אבל להיפך לאחוז הרצועות ושהתפילין תהיה תלויה – אסור אפילו באקראי (עיין מגן אברהם סעיף קטן א'). וכן אסור לתלות אותם ביתד, בין שהתפילין מונחין על היתד והרצועות תלוין, ובין שהרצועות מונחין והתפילין תלוים. וכך אמרו בברכות (כד א): התולה תפיליו – יתלו לו חייו. דורשי רשומות אמרו: "והיו חייך תלואים לך מנגד" – זה התולה תפיליו. אבל אם נתנן בכיס, ותלה הכיס – מותר, דאין כאן בזיון. ובספר תורה גם בכהאי גוונא אסור. וספר תורה צריכה רק הנחה בארון או בתיבה (גמרא שם). וכן סידורים התלוים בשלשלת של כסף – אסור (מגן אברהם סעיף קטן א'). וזהו כשהשלשלת מחובר להסידור, אבל להניחו בכיס ולתלות הכיס – מותר כמו בתפילין (שם). וכן הדין בשארי ספרי קודש.