Chapter 2. A Quick HTML Primer

If you followed the steps in Chapter 1, you know how to install PHP and how to create a new PHP file. Now you are going to learn how to do a little bit of HTML, which produces static pages, whereas PHP allows dynamic pages. The HTML in a web page generally remains the same unless another process, such as PHP, changes it.

Hypertext Markup Language, or HTML, is the backbone code that goes into most web pages that makes text and graphics appear onscreen. This language is basically a set of conventions, followed by all browsers, that allows people to view pages so they look exactly the same in different applications. Because HTML is a markup language, it is a lot easier to write than programming languages such as PHP.

HTML will be used in every web page you make (unless you jump to XML), so it is important that you have a fundamental knowledge of it before moving on. I recommend reading the chapter even if you know HTML; it’ll refresh anything you might have forgotten.

We only have one chapter to do this, so I am going to skip some parts of HTML. If we need to use them later in the text, I will explain them then. Instead of dealing with forms in this chapter, you will find pages dedicated to them in Chapter 3. Let’s start with the structure of a basic HTML document.

All HTML documents have a common structure. Whenever a web browser sees an HTML file, it knows immediately that the file is a web page and should be displayed as such because of a few factors:

  • The .htm or .html extension

  • The ASCII format

  • The common tags

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.218.147