Download presentation
Presentation is loading. Please wait.
Published byRegina Tate Modified over 9 years ago
1
Essential Tags Web Design – Sec 3-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials
2
Objectives The Student will: Learn the basic tags required for all XHTML documents.
3
XHTML FACTS REVIEW Web pages are just plain text. You can view or edit the source code using any text editor. "Tags" provide web browsers with instructions about the web page, such as where to display images, and how the document is structured. Tags are always enclosed in angle brackets:. Tags are comprised of elements and attributes. An element is an object on a page (such as a heading, paragraph, or image), and attributes are qualities that describe that element (such as width and height).
4
XHTML FACTS REVIEW Tags usually travel in pairs. An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text as a paragraph, you would open the paragraph with an opening paragraph tag and close it with a closing paragraph tag (closing tags always proceed the element with a /). A few tags are called non-container tags, because they don't contain any content - they stand alone. Examples are images and line breaks. XHTML requires that all open tags must be closed, even if they're non-container tags. Therefore, non-container tags end in />. For example, the tag for a line break is.
5
XHTML FACTS REVIEW Tags in HTML are not case sensitive, but in XHTML all tags must be in lower case. Even when coding in HTML, you should get in the habit of writing tags in lower case. White space is ignored by web browsers. So, if you hit the space bar multiple times within a document, only one of those spaces will actually be displayed by the browser. Tags can be nested. For example, this text is italicized and bold. Note that the order of nested tags is important: The container tags surrounding any content should be symmetrical.
6
Essential HTML There are some basic tags you must add to every HTML document you create. Yesterday you created a file called index.htm. Today you will add a few basic required tags to this file, thereby beginning the construction of your portfolio. These basic tags provide a skeleton for any web page.
7
Add the following to index.htm file
8
Essential HTML Tags The first line is called the XML declaration which states what version of XML is in use, and what character encoding system is used for displaying all fonts. This line is only used for XHTML documents, not HTML.
9
Essential HTML Tags The second line is the DOCTYPE. It specifies the version of HTML you are using. In this case, we are using a "strict" interpretation of XHTML 1.0. A common mistake among web developers is neglecting to include a DOCTYPE statement. Browsers will display a page differently depending on which version of HTML the page was designed in. Without a DOCTYPE statement, browsers have to guess, and sometimes they get it wrong.
10
Essential HTML Tags is typed before all the text in the document. This marks the beginning of the html document. Web pages are divided into two main sections: the head and the body. The head provides information about the document, including the author, description, keywords, title, and other information. In our "bare bones" document the only content in the head section of our web page is the title. This marks the closing of the head section.
11
Essential HTML Tags You must give your document a title. This title doesn't actually appear within the web page, but appears in the title bar of the browser window. This is also the title of the page that will be displayed by default in search engine results or in user's Favorites. closes the title tag. The body section contains the contents of your document. closes the body tag. ends the html document.
12
Note… You may find it easier to read if you add extra blank lines. Also, indenting content that is inside of other content helps you to see the relationship between all their parts of the page. Remember: Extra spaces and blank lines will be ignored when the HTML is displayed by a browser.
13
Summary Essential HMTL tags are required in every file… TagDescription … Begin and End an HTML document … The header section of the document, which contains information about the page. This is not displayed to the user. Contains meta tags. … Define a document title. This element is required in every HTML document. … Defines the body section of the document, which contains the content to be displayed on the page.
14
Rest of Today Add the text on Slide 7 to your index.htm file. Also save the same text in files named: unit4.htm unit5.htm unit6.htm All files should be saved in your Portfolio_Name folder.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.