Keyboard shortcut for moving an element up or down in the DOM/Navigator

I can select parent or child with up/down arrow, but to move an element (either up one level, or before/after a sibling) something like alt-up/down would be nice~

  • James Trent
  • Apr 22 2021
  • Reviewed
  • Pranav commented
    August 19, 2023 10:45

    In most web development environments, there isn't a universal keyboard shortcut for moving an element up or down in the Document Object Model (DOM) or navigator. The ability to rearrange elements in the DOM is typically done through the development tools of the browser you are using or the code editor you are working with.
    Here's how you might move elements within different contexts:

    1. **Browser Developer Tools (DOM Inspection):**
    - Open the browser's developer tools (usually F12 or right-click -> Inspect).
    - In the "Elements" tab, find the HTML element you want to move.
    - Click and drag the element to a new position within its parent element.

    2. **Code Editor (HTML Source Code):**
    - Select the entire HTML element you want to move.
    - Cut (Ctrl + X) the selected element.
    - Place the cursor where you want to move the element.
    - Paste (Ctrl + V) the element at the new location.

    It's important to note that moving elements in the DOM could affect the layout and behavior of your webpage or application. Be sure to consider the consequences before making changes.

    If you find yourself frequently needing to rearrange elements in your code, you might also consider using a code editor or integrated development environment (IDE) that supports features like drag-and-drop reordering within the code editor window.

    Keep in mind that keyboard shortcuts can vary depending on the development environment you're using, so it's a good practice to check the documentation or settings of the specific tools you're working with.

  • Miles Mitchell commented
    May 03, 2023 20:45

    This would be a total efficiency boost!

  • Hari Prasath commented
    April 06, 2023 11:24

    Why are there so few votes for this one? Does nobody want this feature? I thought literally anybody with a background working with photoshop, illustrator or figma would love to have this feature.

  • Tarik Haiga commented
    February 05, 2023 05:13

    +1 for this. Client has a a large Webflow project, which makes Designer run very slow and easy to make mistakes.

  • Ben Biazar commented
    January 04, 2023 08:12

    Moving an element between many elements that have children is a hard task and it becomes annoying when we misplace elements. Please make a shortcut or fix the UI so we can navigate the elements better. Thank you.

  • Giuseppe Craparotta commented
    August 04, 2022 13:03

    Agree, with shortcut cmd + square brackets would work like Figma.