10.07.2015 Views

Building the User Interface by Using HTML5: Text, Graphics ... - server

Building the User Interface by Using HTML5: Text, Graphics ... - server

Building the User Interface by Using HTML5: Text, Graphics ... - server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

22 | Lesson 2The busy Web site developers at Malted Milk Media have asked you to research newmarkup that’s available in <strong>HTML5</strong>. They’re particularly interested in graphics andmultimedia-related tags. Your task is to learn all that you can about new <strong>HTML5</strong>markup tags and prepare brief descriptions and provide examples of each.LICENSED PRODUCT NOT FOR RESALE■ Understanding <strong>the</strong> Essentials of HTMLTHE BOTTOM LINEHypertext Markup Language (HTML) uses markup to describe content for display on aWeb page. An element is <strong>the</strong> combination of tags and <strong>the</strong> content <strong>the</strong>y enclose. You mayneed to use special characters on a Web page, which requires character encoding. Finally,every Web page requires <strong>the</strong> doctype declaration at <strong>the</strong> top of <strong>the</strong> page.Hypertext Markup Language (HTML) is called a markup language because you use it todescribe (mark up) pieces of content to display on a Web page. A Web page with markupmeans it includes tags, which are keywords that help to give an HTML page structure.(You’ll learn more about tags shortly.) The key to using HTML is learning which tags to useand when. The combination of content, tags, and perhaps graphics, multimedia, and so onare what build a Web page.You can easily identify an HTML document because it has an .htm or .html file extension.When a Web browser or mobile device such as a smartphone opens an HTML file, it renders(interprets and reproduces) <strong>the</strong> content of <strong>the</strong> page.Basic Markup and Page StructureEvery HTML page includes tags. A tag is a keyword surrounded <strong>by</strong> angled brackets.Most tags come in pairs; one tag is called <strong>the</strong> opening or start tag, and <strong>the</strong> o<strong>the</strong>r is <strong>the</strong>closing or end tag. A tag pair is case sensitive—a closing tag must have <strong>the</strong> same case as<strong>the</strong> opening tag. A closing tag is identical to an opening tag except <strong>the</strong> closing tagincludes a slash before <strong>the</strong> keyword.Tags surround content and give it definition. For example, this markup creates a first-levelheading:Pet Care 101HTML also uses some single tags, like for a line break and for a horizontalline. In HTML 4, <strong>the</strong>se tags are called empty tags because <strong>the</strong>y don’t require an end tag.<strong>HTML5</strong> is less restrictive than HTML 4. You don’t have to include end tags for all elements(although some elements still require start and end tags), and you can enter tags in uppercaseor lowercase. However, this book uses start and end tags, and all lowercase for markup,for consistency.There are many tags available for HTML pages. Some of <strong>the</strong> most commonly used tags arelisted in Table 2-1. The first four—, , , and —are requiredon every Web page.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!