XHTML Tutorial - picture
Add a reasonable picture of a web page can make the appearance more
The handbook after more closely linked, we recommend that you read from the first quarter onwards.
Picture tag <img>
<img> Tags for Web pages inserted in the picture. <img> Labelling an important attribute "src", it is the attribute value picture address. Below we, in our index.html insert a picture. Open "index.html" documents, In "/ body> add the following code:
<p> <img Src="http://www.nt22.com/images/logo.gif" alt="Technical Support" /> </ p>
After browsing preservation, please make sure your Web pages with the same.
We note <img> is an empty label needs end with a "/" to comply with the requirements of XHTML. Apart from the examples here, there is a src alt attributes, we call it doing the replacement property, as when the picture for one reason or another can not be displayed when the alt attribute value will replace the picture appeared normal when the picture shows that, as long as parked in the mouse on the picture will see alt attribute attribute value.
As a link with picture
We have before tutorial learning to create hyperlinks Below we open "index.html" and the code will be inserted just below this:
<p> <a Href="http://www.nt22.com/" />
<img Src="http://www.nt22.com/images/logo.gif"alt="Technical Support" /> </ a> </ p>
Preserved website, to make sure your website and the website the same. Look at the picture is not turned into a hyperlink, click picture will enter the homepage of the NT22.
A post-mortem on the validity of the XHTML
From the beginning of this section we will not modify "index.html" the appearance of this page, will now produce authoritative body to the website to test. First Entry: http://validator.w3.org/, the page is a XHTML-tested tools, which we used to test the production's website with XHTML standards. You can choose to use site-tested, and can also upload files-tested. You can select a file upload-tested, as follows:
"Validate by File Upload" "Local File" column, click, locate and preserve selected before the "index.html" and then click the "check" button. You should be with us the results of site-tested by the results of the same. Back to the following error message:
Sorry, I am unable to validate this document because on line 3, 6-9, 12-14, 16-22 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.
Are we not in line with the website XHTML standards? Please continue to read the contents of the next section.
Enter the next section: XHTML Tutorial - head and DTD
