TweetFacebookShareThis

Writing HTML Code Part 2

Previous Page    Next Page

Content

When thinking of the type of content the web site would include we need to consider the style and layout of the pages, you should know what is the most important information that your visitors need to know about your web site and how best to visually present it, below are some examples of the other things that can be used to help you with your visual presentation.

Headings

To create headings on a web page the <h1>Insert your headings here</h1> start and end tags are used, there a six sizes h1, h2, h3, h4, h5 and h6 used in transitional HTML/XHTML.

Paragraphs

Using the Paragraph and the Single Line Break tag, paragraphs are created using the <p>Insert your text here</p> start and end tags, also used in this example is the <br /> single line break tag.

Creating an Horizontal Rule

Horizontal Rules can be placed to create divisions on a web site, the following code is used to create these <hr /> and you can see an example below, these have been used on the links page of this web site to divide the different links to other web sites of interest.



Using the img tag to insert Images

Inserting graphics to the web page is done by using the <img src=""> attribute. Inserting the name of the file with its extension in quotation marks and using the <alt=""> attribute to give a description of the graphics file as in the example
<img="pic1" alt="webdesign image /">

webdesign image

Creating Links

If you want to create links to other web sites on your own web site use the anchor tag, you need to make sure you use the full URL address of the site you're linking to and if you use target="_blank" this will open the site in another page so that your visitors can return to your web site after using the link that you have referenced, as in the example below
<a href="http://www.ciwcertified.com target="_blank">CIW Website</a> this takes you to CIW's homepage.

CIW Website

Creating links to other pages on your web site using
<a href="http://www.computerstudies.org.uk/index.php">Computer Studies</a> this takes you to this web sites homepage.

Computer Studies

Creating links to other locations on the same page on your web site using the
<a href="#toppage">Back to the top of the page </a> and the <a name="toppage"> Toppage</a> name attribute. this takes you to the top of this web page.

Back to top of the page

Some great tutorial sites for learning how to write code
www.w3schools.com
htmldog.com
www.devguru.com

The World Wide Web Consortium (W3C)
www.w3c.org

W3C Markup Validation Service
validator.w3.org

Previous Page    Next Page

Recommended Books