Play songs in HTML documents?

Sahithi Pallavi

Sahithi Pallavi

@sahithi-oJZaYj Oct 26, 2024
Hi guys..

Is it possible to play songs in the HTML documents? In the sense when we open a web page, the song which is written in the code has to play automatically and it has to stop when the document is being closed. Is it possible? If yes, tell me please.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • 2467

    2467

    @2467-TllAzE Feb 6, 2010

    Re: A doubt in HTML.

    yes it is possible, i have observed it in various sites ,but don't have a perfect idea how..
  • Sahithi Pallavi

    Sahithi Pallavi

    @sahithi-oJZaYj Feb 6, 2010

    Re: A doubt in HTML.

    yes 2467, I also seen in so many web pages. so am asking this question.

    I am waiting for the answer.
  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Feb 6, 2010

    Re: A doubt in HTML.

    yes pallavi it is possible
    use this
    <embed src="nameofsongfile.wav" autoplay="true" hidden="true" loop="true"/>
  • 2467

    2467

    @2467-TllAzE Feb 6, 2010

    Re: A doubt in HTML.

    you can look upto the following link
    <a href="https://www.2createawebsite.com/enhance/adding-music.html" target="_blank" rel="nofollow noopener noreferrer">How to Add Music to Your Website</a>
  • Sahithi Pallavi

    Sahithi Pallavi

    @sahithi-oJZaYj Feb 7, 2010

    Re: A doubt in HTML.

    Its working. Thank you so much goyal.

    And thanks for your link 2467.
  • Sahithi Pallavi

    Sahithi Pallavi

    @sahithi-oJZaYj Feb 9, 2010

    Re: A doubt in HTML.

    But, why a pop up window is appearing while opening the html document?
  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Feb 9, 2010

    what kind of pop up?
  • Sahithi Pallavi

    Sahithi Pallavi

    @sahithi-oJZaYj Feb 9, 2010

    Its just like normal pop ups which appears in the internet explorer.

    i.e To help protect your security, Internet explorer has restricted this file from showing active content that could access your computer. click here for options.

    After clicking the Allow blocked content option, am getting the song.

    where as using opera, am getting as plug-In content. After accepting that, song is playing.
  • Luchi

    Luchi

    @luchi-yvstt1 Feb 10, 2010

    It is possible . I had the same problem in those days while learning about Web design in HTML. But sorry to say now i am detached form web design .