Website Development

You can identify a tag by looking at angles, two special characters that look like this: <>. To create a label, you type the HTML code between the brackets. This Code is for the eyes as the browser, the web visitors never see (unless they use the View Source ➝ thing to look at the HTML). Essentially, the code is an instruction which transmits information to the browser how to format the text that follows. For example, a single tag is the tag , which means “fat” tag names (are always lowercase). When a browser encounters this tag, it passes over the bold, which affects all the text following the tag. Here’s an example: Chapter 2: Creating your first page 27 HTML tags This text is not bold. This text is bold. By itself, the keyword is not good enough, he is known as a start tag, which means that it turns on a certain effect (in this case, bold). Most tags are beginning coupled with a closing tag cutting effect. You can easily recognize an end tag. They look the same as the start tags, except that they begin with a slash. They look like this . Here’s an example: This is not fat. Warning! Now we’re back to normal. Which a browser displays as: This is not fat. Be careful! Now we’re back to normal. This example illustrates another important principle of browsers: They have always done tags in order, depending on where the tags appear in your text. For the bold formatting the right place, you need to make sure the position of the and tags appropriate. As you can see, the browser has a fairly simple work. It scans an HTML document, searching for tags and enable or disable various formatting parameters. It takes else (anything that is not a tag) and display it in the browser window. Note: Adding tags to text and Vanilla is known as the marking of a document, and the labels themselves are known as HTML markup. When you look at raw HTML, you may be interested to examine the contents (The text between the tags) or the markup (the tags themselves). Understand the elements As you’ve seen tags come in pairs. When using a start tag (like for fat), you must include an end tag (like ). This combination of tags start and end and the text between them is an HTML element. Here’s the basic idea: The elements are containers (see Figure 2-4). You put some content (As the text) within this container. For example, when using the and you create a container that applies bold formatting to the text inside the container. As you create your web pages, you use different containers to wrap various parts of text. If you think about the elements in this way, you’ll never forget to include an end tag. Figure 2-4: For bold text, you need to start with the good container. This is the familiar. Beware! Start tag is transformed into fatty setting End tag is transformed into fatty Content formatting off An element 28 Creating a website: The Missing Manual HTML tags Note: When someone refers to the element , they hear the whole shebang tag-start, end tag, and content between the two. When someone refers to a tag , they mean just the instruction that triggers effect. Of course, life would not be very fun (and computer books would not be nearly as thick), no exceptions.