This tip only applies if you have Adobe Illustrator CC (Creative Cloud). I confirmed it works in that, or the even newer CC 2014.
It’s as simple as can be: copy from Illustrator, paste into HTML.
What is on your clipboard when you copy in Illustrator is apparently SVG syntax. Pretty dang useful sometimes. Just remember to clean house as needed as often what you get out of Illustrator isn’t perfectly ideal for the web.
I don’t think this works if part of the selection is a text object.
I wanted exactly opposite of this. I have svg codes, but I dont want to save files. Directly paste on illustrator. it pastes text. May be illustrator doesnt want to analyse what text is being pasted, but there can be one option in file menu that opens a dialogues box to paste svg code and further directly rendered on illustrator.
I realize this post was from 2017, but I wanted to mention that you can paste valid SVG shapes into illustrator from text now. I use Codepen to paste shapes to and from illustrator regularly (thanks to this post) and it works so long as you have the entire SVG selected. I’m using the latest version of Illustrator so this may be a new feature.
LOL, this is awesome! THX a lot! (Works in 22.0.1).