Web Pages
Web pages are created, stored, and sent in encoded form
A browser converts them to what we see on the screen
Hypertext Markup Language (HTML) is the main language used to define how a Web page should look
Features like background color, font, and layout are specified in HTML
Marking Up with HTML
The words on a Web page are embellished by hidden formatting
There is XHTML or the Extensible Hypertext Markup Language
We will use HTML
XHTML tags are also HTML tags, but not vice versa
There are some parts of the original HTML that are not part of XHTML
Formatting with Tags
Tags are words or abbreviations enclosed in angle brackets, < and >
Many tags come in pairs
The second of the pair comes with a slash:
Required Tags
The head section contains the beginning material like the title and other information that applies to the whole page
Required Tags
the main content of the page goes hereThe body section contains the content of the page.
This
Making Links
two parts to a hyperlink
Marking Links with Anchor Tags
Both parts of the hyperlink are specified in the anchor tag:
Structure of the Image Tag
An image tag specifies a file that contains an image:
src is the abbreviation for “source”
filename uses the same rules for absolute and relative pathnames as anchor tags
alt value specifies an alternative form for the image, usually a textual description
Structure of the Image Tag
The alt tag was introduced to assist persons who are visually impaired
Screen readers don’t know what the image is, but they can read the description of the alt tag
HTML requires alt tags
When an image is not available or loads slow, browsers display the alt information
Image File Types
the file name needs to use the correct file extension
.gif, .png, .jpeg and .jpg are frequently used extenstions
Attributes for Image Tags
The attributes width and height of the image tag can be used to specify the size of an image
The photo puffer.jpg will appear as 200 × 200 pixels, even if the actual size of the photo is 2000 × 2000
Specify only the width or the height of an image
Summary
Recall the idea of using tags for formatting:
Материалы на данной страницы взяты из открытых источников либо размещены пользователем в соответствии с договором-офертой сайта. Вы можете сообщить о нарушении.