Lesson 5. Inline Editing

HTML5 specifies that you can make elements editable—that is, let the user edit its content. In fact, you can make a whole document editable, which is what we’ll discuss in this lesson.

That’s not to say that we’re talking about text fields either—when you make an element editable, you can include all kinds of elements, such as <div> elements.

In this lesson, we’ll make a <div> element editable, which means that when a user clicks it, a text-insertion caret appears, and the user can type. Users can also format the text, as we’ll see.

In addition, we’ll make a whole document editable, including an <iframe> element. We’ll even let users spell check their text.

Let’s jump into inline editing now.

Welcome to Inline Editing ...

Get Sams Teach Yourself HTML5 in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.