• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Using Core HTML Properties > The innerHTML, innerText, outerHTML, an...

The innerHTML, innerText, outerHTML, and outerText Properties

The innerHTML, innerText, outerHTML, and outerText properties are the basis of much Dynamic HTML, because they enable you to access an HTML element’s HTML and text, and change them at runtime. We’ll put these properties to work in Chapter 16. Here’s an overview of these properties:

  • innerHTML. Changes contents of element between start and end tags, can include HTML.

  • innerText. Enables you to change the text between the start and end tags of an element.

  • outerHTML. Contents of an element, including start and end tags, treats text as HTML.

  • outerText. Enables you to change all the element’s text, including the start and end tags.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint