我该如何使用overflow:使用header标签隐藏

我想将标题保留在单行中,如下所述:

h2 {
    overflow: hidden;
}
<h2>
I want to keep the text of this header in single-line... the extra characters should be hidden
</h2>