XML and HTML
What are the tow main differences between XML and HTML? Also, the basic HTML commands are also enumerated.
XML and HTML are complementary computer languages. Stated below are the two main differences between XML and HTML:
1. XML DESCRIBES data while HTML DISPLAYS data. XML commands focus on data itself while HTML commands focus on displaying the data.
2. XML tags are made by the programmer or author while HTML tags are predefined. HTML tags are defined by the World Wide Web Consortium or W3C while XML tags are defined by you!
Basic HTML Commands
Before getting into XML, it is important to understand HTML, the Hypertext Markup Language. Below are some of the basic tags used in the HTML computer language. You will be seeing a lot of HTML while learning how to use XML. Commit these tags to memory so that you do not get lost in the succeeding chapters.
| <html> </html> | Identifies the document as an HTML file |
| <title> </title> | States the title of your HTML file |
| <head> </head> | Makes a heading |
| <body> </body> | Makes a body |
| <p> </p> | Makes a paragraph |
| <center> </center> | Centers the text |
| <i> </i> | Italicizes the text |
| <b> </b> | Makes the text bold |
| <h1> </h1> | Heading with 25 point bold |
| <h2> </h2> | Heading with20 point bold |
| <h3> </h3> ... etc | Heading with 14, 12, 10... etc |
| <!--- ---> | Comments (ignored by HTML) |
| <img src = "..." > | Inserts an image |
| <a href = "..."> </a> | Inserts a link |
| <table> </table> | Inserts a table |
| <pre> </pre> | Use for preformatted code |
| <ul> <li>... </ul> | Creates an unordered list |
| <ol> <li>... </ol> | Creates an ordered list |
| <br> | Creates a line break |

www.mcdonalds.com, Almost all websites on the internet use the HTML format. Shown above is an HTML page being viewed using Microsoft's Internet Explorer. The McDonald’s website uses HTML pages to market itself to the whole world. Have you had a Happy Meal lately?