You can do that, but its tedious. Why not use a visual layout editor, and the press a button and it generates the code for you.
Same as copy-paste --- you CAN copy paste everything, and the change manually everything when needed. Its already possible, as you say; but its tedious and boring and error prone.