Sudo isn't the right tool for this job. It controls what commands you can run, not what files you can access.
The right tool for the job is file permissions, with access control lists if the Unix traditional user/group/other permissions aren't enough.
Create a group, let's call it
webroot, and make it own the directory
/var/www/html and the files in there.
sudo addgroup webroot
chgrp -R /var/www/html
chmod -R g+ws /var/www/html
s bit on directories cause files to inherit group ownership from the directory. You'll also need to ensure that the files there are group-writable.
If you want to be able to access
/var/www/html with the account you're using to upload files, add that account to the
sudo adduser iusemagentonow webroot
If you have trouble maintaining group ownership and group write permission on newly created files, use ACL instead of
sudo setfacl -d -R group:webroot:rwX /var/www/html
sudo setfacl -R group:webroot:rwX /var/www/html
Take care that files in
/var/www/html must not be writable by the user and group running Apache or whatever web server you're using. The user running the web server must not be allowed to write any files except for data files that are supposed to be updated by the web application. In particular, don't allow the web server to write any executable file, as that tends to make exploits easy.