1 / 11

Introduction to HTML 4.0

Introduction to HTML 4.0. Getting Started – Comments & Attributes. Teacher: Mr. Ho. Comments. Comments: English description that explains what a section of HTML code does. Why Comments?. Do you remember what you did in this class 3 or 4 weeks ago? Not Likely

forest
Download Presentation

Introduction to HTML 4.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to HTML 4.0 Getting Started – Comments & Attributes Teacher: Mr. Ho

  2. Comments • Comments: English description that explains what a section of HTML code does

  3. Why Comments? • Do you remember what you did in this class 3 or 4 weeks ago? Not Likely • That is why we need comments so that we will remember what the HTML code does.

  4. How to Write Comments? • Opening Tag: <!-- • Closing Tag: --> • You write your comments between <!-- and --> • E.g.: <!-- Hello, I am Mr. Ho --> • Note: Comments will not be displayed on the screen.

  5. Attributes • Most HTML tags have attributes, which add additional features to the HTML tags.

  6. <body> … </body> • Has background, bgcolor, and text attributes. • background attribute: allows you to add a background image (i.e., wallpaper) to the HTML file • bgcolor attribute: allows you to add colour to the background of the HTML file • text attribute: allows you to set the colour of the text in the HTML file

  7. Example: <body> … </body> <html> <head> <title>Demo of Attributes</title> </head> <body bgcolor=“red” background=“image.gif” text=“yellow”> Testing … </body> </html>

  8. <h1> to <h6> Tags • Create the HTML headings • Have one attribute, which is align. • The align attribute can be set to the following values: • left • center • right • justify

  9. Example: <h1> to <h6> Tags <html> <head> <title>Demos</title> </head> <body> <h1 align=“center”>Testing</h1> </body> </html>

  10. <body> and <h1> to <h6> Tags • Note: <body> and <h1> tags do not have to include attributes. • Attributes are used so that you can add additional formatting features to your HTML file.

  11. Questions & Answers • Do you have any questions so far? • If you do, please ask now.

More Related