Sign Up

Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Oraask Logo Oraask Logo
Sign InSign Up

Oraask

  • Write
    • Add A New Post
    • Ask A Question

Oraask Navigation

Search
Ask A Question

Mobile menu

Close
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials
Home/ Questions/Q 79589
Next
In Process

Oraask Latest Questions

Question
PraveenM
  • 0
  • 0
PraveenMExplorer
Asked: June 18, 20222022-06-18T04:00:00+03:00 2022-06-18T04:00:00+03:00In: JavaScript

What is innerhtml in javascript

  • 0
  • 0

What is inner HTML in javascript?

1
  • 1 1 Answer
  • 128 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    Related Questions

    • Set form control value in angular
    • How do I append more elements after clicking in react
    • How can we add margin left to badge in Angular material
    • How can we add bootstrap to Angular project
    • How to bound a state variable to a field react final form

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. srikanth tekumudi
      srikanth tekumudi Junior < Frontend Developer at Phenom /> || Mock Interviewer || Javascript || to teach React || Content Creator
      2022-06-21T08:40:42+03:00Added an answer on June 21, 2022 at 8:40 am
      This answer was edited.

      InnerHTML is a property of every element. It tells you what is between the starting and ending tags of the element, and it also let you sets the content of the element.

      innerHTML will show the value and apply any HTML formatting.

      Ex:

      HTML:

      <div id='content'> Hi this is awesome </div> 

      js:

      let ele= document.getElementById('content') ele.innerHTML='<h1>text changed </h1>' 

      ouput:

       text changed 

      (in h1 style) innerHTML apply any HTML formatting in string.

      InnerText:

      InnerText wont apply HTML formatting

      ex:

      let ele= document.getElementById('content') 
      ele.innerText='<h1>text changed </h1>' output: <h1>text changed </h1> (html formatting will not apply here. It is interpreted as String only)
        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Adv 250x250

    Explore

    • Categories
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Dev Tools
      • Online Compiler
      • Base64 Converter
    • Wiki
      • SQL Tutorials
      • Java Tutorials
      • Python Tutorials
      • JavaScript Tutorials

    Footer

    Oraask

    About

    Oraask is a website for developers and software engineers who want to learn new skills, share their knowledge, and solve their coding problems. Oraask provides free content on various programming languages and topics, such as Oracle, Python, Java, etc. Oraask also allows users to ask questions and get answers from other members of the community.

    About Us

    • About Us
    • Contact Us

    Legal Stuff

    • Privacy Policy
    • Terms & Conditions

    Follow

    Oraask is licensed under CC BY-NC-SA 4.0Oraask CopyrightOraask CopyrightOraask CopyrightOraask Copyright

    © 2019 Oraask. All Rights Reserved
    With Love by Oraask.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.