I am trying to make this XML document look like an actual webpage with links and
ID: 3829875 • Letter: I
Question
I am trying to make this XML document look like an actual webpage with links and other pictures. I don't know if I can do that in XML, or do I have to make it a html? Below is my output and code. Let me know if I can make a webpage in XML and if I can please give me a hint how to.
/////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
index.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="index.css"?>
<head>
<intro> Welcome to Toronto, Canada</intro>
</head>
///////////////////////////
index.css
head{
color: Red;
font-size: 72px;
font-family: "Times New Roman", "Sans-serif";
text-align: center;
background-image:url("G:\images\Canada.jpg");
background-position: center;
}
body{
color: Orange;
}
Explanation / Answer
You cannot actually use XML to be interpreted by web browsers and display them as web pages.XML are mostly used these days as data containers, rather than a Graphical Interface. A very few application, such as Android uses XML to represent GUI.
Since our web browsers cannot interpret XML as web pages, we need some application at the server side to convert XML to HTML so that the browser can show us the web page. For your case, you need to write html file to display the desired page.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.