|
Starting HTML Navigation
Common HTML TAGSNow we are going to take a look at some of the more Common tags that you will encounter:
HeadingsThe heading structures are most commonly used to divide sections of text. There are six levels of heading (from H1 to H6) and by default browsers will display the six heading levels in the same font, with the point size decreasing as the importance of the heading decreases. Heading tags look like this: <H1>Text for Heading 1</H1> Here is how the headings would be displayed in a browser The most commonly are headings 1-4. On most pages you will find usually an opening H1 headline and all others use h3 or an opening H2 headline and all others use h4. H2 is often used in preference to H1, as H1 can appear too large unless it is modified (using a style- not covered in this course) ParagraphsA page is composed of a number of sections separated by headings, each of which is composed of one or more paragraphs. The beginning of a paragraph is marked by <P>, and the end by </P>. When a browser comes across a <P> tag it starts a new line and adds some vertical white space between the last line and the new line. Paragraphs don't strictly speaking require the closing tag </P> but you should use it. Exercise 2. 1. Open the page1.htm file in Notepad and position your cursor after the first body tag. 2. Now delete the line My First Web <b>Page</b> 3. Insert the following text between the body tags. You can copy and pase it from this page to save your typing:
4. Save the file and view it in a browser. The file should look like this End Exercise 2. HTML comments
The following are examples of XHTML comments:
Why use HTML Comments
Exercise 3- Inserting a comment 1. Open page1.html 2. Insert the following text into the page after the closing H2 tag.
3. Save the file and view in a browser. The comment should not be visible. End Exercise 3. QuizHere is a sample of html code that is incorrect. There are two errors can you spot a correct the mistakes. Question 1
Answer to Question 1 (opens a new window)
Continue to next---->Lesson3 Lesson1<------Previous |
|||
|
Amazon UK
HTML for the World Wide Web with
XHTML
|