|
|
FREE Web Design QuoteTell us about your project and get your web design quote here. Contact Refresh:158 Torquay Road Fax: 0870 80 30 989 Google Maps Click Here Featured Website ProjectClient: Silhouette Photographers Description: Website Design News |
What is XHTML and what is it used for?Please Note: This is a beginners guide and does not go into great depths regarding styling webpages using CSS (Cascading Style Sheets). Tutorials on CSS usage will becovered in the future in another tutorial section. This tutorial concentrates on the Basic Structures of XHTML documents a.k.a. web pages. What is XHTML and What does it have to do with Website Design?XHTML or HyperText Markup Language as is is otherwise known is the language for displaying web pages on a variety of technology from mobile phone to PCs, web TV, the Wii Shop Channel and many more devices. It's based upon a simple tagging structure where you mark areas of text or code as for example:
and many more which we will explore into later in this tutorial. I could go on about how the language came about and it's references to SGML, etc, etc but that's not really important for learning about the stuff. Lets get straight in with our first web page (code shown below) First web page Code<html>
Copy and paste the boxed code to the left into a text editor of
your choice. Then save the file as index.html on your computer somewhere and open it up inside the web browser of your choice. I prefer Firefox but any slightly recent one should do. Notepad Users be sure to change your type of file to *.*, not *.txt or (Text File). This will result in the file being named index.html.txt which is incorrect. Assuming you've saved the file with the correct name you'll probably get something like this displayed on your browser
Groovy! You've made your first web page. Now, lets take a look again at the code behind it in more detail. First web page Code Explanation<html>
<html> tags <html>
<head> tags <html>
<title> tags <html>
<body> tags <html>
<p> tags Beginners PitfallsHopefully you'll have noticed that XHTML uses opening and closing tags to define it's elements and that these can be layered within each other. For example: The following code is nice and valid and displays itself properly. <p><strong>Hello</strong>
Internet!</p>
Where as the following code (whilst it will still work in modern browsers) is incorrect and may result in layout or display errors in the document. <p><strong>Hello
Internet!</p></strong>
You must ensure that inner tags inside outer tags are closed
before closing outer tags and aren't left overlapping one
another.
And, just for a bonus, the following self-closing tags will do the following:
SummaryIn this lesson we have established the following:
That's all for lesson 1. Viewed 1115 times since 01 Mar 2010 |
Why Refresh Creations?All our websites we create are secure and customer editable. We tailor our admin system to your website for a simple-to-use, effective form of website management. Contact Now
Recent Tweets |
Contact Refresh Creations Now on 0845 09 42 987
Legal |
Web Design Services |
Refresh Creations Website Design |
|---|---|---|