These commands have to be entered in the dialog box of the games shortcut: right click>Properties and in the Target box, after the path ("C
rogram Files/Valve/Steam/Steam.exe") with a space. They don't work in the console.
-width [pixels] -height [pixels]: Using these two commands you can set a custom resolution in Pixel Width x Pixel Height (e.g. -width 800 -height 600 starts HL2 with 800x600esolution). Make sure you choose a resolution supported by your monitor and with the correct ratio of width to height (usually 4:3).