The Basics of HTML by AVINASH S. JOHN SMASHWORDS EDITION * * * * * PUBLISHED BY: JOHN on Smashwords The Basics of html Copyright © 2013 by avinash john smith Smashwords Edition, License Notes Thank you for downloading this free ebook. Although this is a free book, it remains the copyrighted property of the author, and may not be reproduced, copied and distributed for commercial or non-commercial purposes. If you enjoyed this book, please encourage your friends to download their own copy at Smashwords.com, where they can also discover other works by this author. Thank you for your support. Table of Contents Tags and html files HTML & Abstraction How do we write it? The basic framework Notepad Observations HTML = HyperText Markup Language is the markup language used for hypertext (yeah, that says very little...) A markup language is a system of tags that describe how to format a document. There's usually some kind of interpreter that reads a document in the markup language and displays it in a nicely formatted way. Hypertext is the technical term for web pages, i.e. text with formatting and which the user can interact with (e.g. clicking links, hence the "hyper" part). The interpreter for hypertext is a web browser. Tags and HTML Files HTML files are plain text files --> no formatting We need ways to tell the web browser when to start formatting text in certain ways, insert things like horizontal rules and links, etc. These are the tags. They're code that is understood by the writer and replaced by the interpreter with appropriate formatting HTML & Abstraction Abstraction is one the most fundamental concepts of computer science. Definition: Ignoring the details of a complicated system to focus on the essentials needed to use the system. Focusing on WHAT we're doing, not HOW it is done. Where do we use abstraction in our daily lives? Why is this important? HTML is a great example of abstraction in action. When we look at a web page in a browser, we are viewing the same thing as the HTML code, but at a different (higher) level of abstraction. How do we write it? HTML files are plain text files, so a simple plain text editor will work fine. The simple one in Windows is Notepad. The simple one in Mac OS X is TextEdit. Notepad It's usually found under Start > Accessories > Notepad. Very limited set of commands, but if you can use Office, you can certainly learn Notepad. When you save in Notepad, the default file type is txt. For HTML, you want the extension html or htm. To achieve this, type the filename in double quotes in theSave As dialog, e.g. "index.html" A few simple tags: formatting Bold example Italics HTML As displayed in browser some kind of interpreter that reads some kind of interpreter that reads Caution! Watch that you have a closing tag to go along with the opening tag. Watch that the closing tag has the /. The basic framework The HTML file itself is all wrapped within an outer set of tags common to all HTML files. Here's the basic framework (you could feasibly copy and paste this each time you get started):