jQueryを使う

$("#myid").html('物凄く長い文字列物凄く長い文字列物凄く長い文字列');

短くなる


変数を使うとさらに短くできる

const text = '物凄く長い文字列物凄く長い文字列物凄く長い文字列';
$("#myid").html(text);