XHTML getting started Tutorial: XHTML webpage image app _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
Adding images can make a webpage more beautiful. Image Tag & lt; img & gt; tags are used to insert images into webpages. & Lt; img & gt; a tag has an important attribute & quot; src & quot;. Its attribute value is the image address. Next we will insert an image in our index.html. Open &rdquow.index.html & ldquo; adding images to a file can make a webpage more beautiful. Image Tag
Tags are used to insert images into a webpage. A tag has an important property "src". Its attribute value is the image address. Next we will insert an image in our index.html. Open the "Export index.html" fileAdd the following code:


Save and view the web page. Make sure that your web page is the same as this page.
We noticed that it is an empty tag, and we need to add a "/" at the end to meet the XHTML requirements. In this example, there is an attribute alt in addition to src. We call it a replacement attribute. When an image cannot be displayed for some reason, the attribute value of alt will appear instead of the image; when the image is normally displayed, you just need to move the mouse over the image to see the attribute value of the alt attribute. Use images as links
In our previous tutorial, we learned how to create a super chain. Next, we opened "index.html" and changed the newly inserted code to the following section:


Save and browse the webpage. Please confirm again that Your webpage is the same as this webpage. Check if the image has changed to a hyperlink. Click a hyperlink to go to The cainiao homepage. XHTML Validation
Starting from this section, we will no longer modify the appearance of the "index.html" webpage. Now, we will send the webpage we created to an authority for inspection. First go to: Workshop. You can select to use the URL for verification or upload a file for verification. You can select the File Upload verification method as follows:
In the "Validate by File Upload" column "Local File", Click Browse, find and select the previously saved "index.html", and then click "check. Your results should be the same as our website verification results. The following error message is returned:
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.
Isn't our webpage conforming to the XHTML standard? Continue to read the content in the next section.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.