It’s one thing to obsess over the aesthetics of your flat-screen TV — the beveled corners, the screen size, the color temperature. But without thoughtful installation, you can wind up with a beautiful rectangular display surrounded by a rat’s nest of cords, or worse, 40 pounds of glass and electronics that might fall off the wall at any moment.

Todd Anthony Puma, chief executive of The Source Home Theater in New York, sees poorly installed televisions all the time — equipment not mounted on the studs or barely held in place with just a couple of screws or anchors. “What would happen after a period of time is that the TV would slowly but surely come off the wall, and sooner or later, you have a television that’s on your floor and possibly could injure somebody in the home, which is the worst-case scenario,” he said.

Here’s what to consider if you want to mount your TV securely without sacrificing the room to a tangle of cords.

Before you do anything, make a plan

Think about all of the devices you’ll need to connect — not just the boxes, such as gaming consoles or a cable box, but also your audio receiver, speaker or soundbar. Make sure that your shelving unit or cabinet has enough space to hold everything, and that you have enough cables and wire for every device you plan to connect, and that they’re all long enough.