Sign Up

Sign Up to our social questions and Answers Engine 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 Engine 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

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9220691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:24:32+00:00 2026-06-18T03:24:32+00:00

I have some HTML5 files in which I embedded XML through object element. Now,

  • 0

I have some HTML5 files in which I embedded XML through object element. Now, for the HTML files I have alternate stylesheets. What I want to do is to change the style for the embedded XML (because the XML file has its own stylesheet) in the same time with the HTML. So, when I choose a style for the HTML page with the help of the browser, I want the style of the XML to be also changed. Is there any way to do this?

HTML:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>LondonDiamond Restaurant Menu</title>
    <meta charset="UTF-8" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" media="screen" title="Standard red black white"/>
    <link rel="stylesheet" type="text/css" href="../css/style_print.css" media="print" title="Print"/>
    <link rel="alternate stylesheet" type="text/css" href="../css/alt_style.css" media="screen" title="Monochrome"/>
</head>
<body>
    <object data="../xml/menu.xml"><span></span></object>
</body>
</html>

XML:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="../css/style4xml.css"?>
<!DOCTYPE menu SYSTEM "../dtd/menu.dtd">

<menu>
     irrelevant
</menu>

What happens is that when I chose the alternate stylesheet for the HTML, the colors change, but the embedded XML keeps the same color (and it is normal) BUT I also want to change it in the same time with the HTML.

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

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:24:33+00:00Added an answer on June 18, 2026 at 3:24 am

    What I did was to apply the same default and alternative stylesheets both for the HTML files and the XML ones. And in the CSS files I have the style for the HTML and XML elements.

    HTML:

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>LondonDiamond Restaurant Menu</title>
        <meta charset="UTF-8" />
        <link rel="stylesheet" type="text/css" href="../css/style.css" media="screen" title="Red Black White"/>
        <link rel="stylesheet" type="text/css" href="../css/style_print.css" media="print"/>
        <link rel="alternate stylesheet" type="text/css" href="../css/altstyle.css" media="screen" title="Monochrome"/>
    </head>
    .......
    </html>
    

    XML:

     <?xml version="1.0" encoding="UTF-8"?>
     <?xml-stylesheet type="text/css" href="../css/style.css" title="Red Black White"?>
     <?xml-stylesheet type="text/css" href="../css/altstyle.css" alternate="yes" title="Monochrome"?>
     <!DOCTYPE menu SYSTEM "../dtd/menu.dtd">
    
     <menu>
          .....
     </menu>
    

    CSS:

    body {...}
    header {...}
    ...
    menu {...}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have .XML, .JS and some .JPG files for 3D-pano in HTML5, which are
I have some html files and want to extract only lines with containing these
I have some html files that I want to convert to text. I have
I have some html files with their own css. I want to use them
I have one input file which has html tag embedded in xml for example
I have a directory with about 4500 XML (HTML5) files, and I want to
I have some HTML files, and what I want to do, is put something
I have some static resources (images and HTML files) that will be localized. One
I use DOMDocument for editing some HTML files, but some of theme have in
I have a .NET console application that needs to generate some HTML files. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

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.