Easy Web Site DesignHTML tutorial : Basic HTML Code |
|
|
Suggested reading |
Let's look more closely at what may go inside the body section:
The <H1> and <H2> elements are headers. HTML offers up to six levels of headers (ie to <H6>). By default, browsers display each level of header progressively smaller - ie <H1> is the biggest, <H6> the smallest. In practice it's rare to use headers lower than <H3> or <H4>. We've already met the <P> element. It's purpose is to treat enclosed content as a paragraph. By default, browsers will display some white space above and below the paragraph content. Note that I say "by default" when talking about presentation. This is because it is possible to define exactly how browsers display particular elements by using style sheets. The <BR> tag is used on its own (it does not have a closing tag), its purpose is to create a line break, ie what follows <BR> is displayed on a new line. <STRONG> tags cause enclosed text to be displayed in bold type. <EM> tags cause enclosed text to be displayed in italics. Tags can be combined, eg <STRONG><EM>gives bold italics</EM></STRONG>. Just remember to close the tags in the reverse order to which you opened them, so the <EM> part is contained within <STRONG>. One of the great strengths of the Web is its ability to jump from one page to another by means of hyperlinks. This is what the HTML code for a hyperlink looks like.
Everything between the start and end tags will be displayed as a clickable hyperlink. Like many HTML tags, the <A> tag contains an attribute, this is an additional piece of information inside the tag. In this case the HREF attribute tells the browser which page to open if the hyperlink is clicked. Another attribute that can be provided within the <A> tag is TARGET. If this is set to _blank the linked page will open in a new window when the hyperlink is clicked, eg
The <IMG> tag is used to display images.
<IMG> has no end tag, but it does have a number of attributes. SRC indicates the location and file name of the image to be displayed. More on Web graphics HEIGHT and WIDTH specify the height and width the image is to be displayed at. They can be used to change the size of an image. If omitted, the image will be displayed at its original size. However, it is a good idea to include height and width attributes as they allow the browser to display the text for the entire page without having to wait for the images to load. ALT is used to provide an alternate text description for the image. It is good practice to include the ALT attribute as it makes your Web site more accessible. Want to learn more? See W3C - Dave Raggett's Introduction to HTML NCSA - A Beginner's Guide to HTML USENET newsgroups: |
| © web.twinisles.com Questions? Comments? Contact info@twinisles.com | |