Midterm 2 Study Notes.docx

18 Pages
Unlock Document

McMaster University
Computer Science
C S1 B A3 Administrative Details

Computer Science 1BA3: Midterm #2 Study Notes Unit #1: HTML - XHTML HTML (Hypertext Markup Language): the authoring language used to create Web pages, and is intended to describe the content and structure of a Web document. Living language; continues to be revised by the international World Wide Web Consortium (w3c.org) Basic text file, simple editor for text files (ex. Notepad in Windows, .txt) Way that text and graphics on Web pages must be formatted HTML does NOT equal programming language Uses computer code Series of instructions that renders (displays exact likeliness of) the content of your Web Page in Browser You create code to describe the structure of a web page in terms of paragraphs, lists, forms, etc. Guidelines for writing HTML Documents: Use LOWERCASE when entering HTML tags and attributes Close all tags, including empty elements Enclose attribute values in quotes When nesting tags, the first tag opened must be the last tag closed Use hard returns, spaces, and tabs to keep your HTML code neat and readable Do not use spaces in folders or file names Test your code on several different browsers and browser versions Internet: global network of computers linked by high-speed data lines and wireless systems World Wide Web (WWW): just one of several services provided by the internet Web Browser: software used to view and browse, or surf web pages 1 commercially available browser: Netscape Navigator Contemporary browsers: Internet Explorer (Microsoft), Safari (Apple), Mozilla Firefox, Google Chrome Web Page Designer: person who designs web pages (works w/ Adobe Dreamweaver, Photoshop, etc.) Web Page Developer: writes programming code to add greater functionality to Web Pages (works w/programming languages; Javascript, PHP, etc.) Web Page Devsigner: developer and designer World Wide Web Consortium (w3c): organization whose full-time staff works to develop standards for the many languages used on the World Wide Web, including HTML standard Recommendation: when w3c finalizes a draft; is currently developing HTML 5.0 New browsers must be developed that will support (make use of) new features of HTML 5.0 HTML Extensions: code that would work only in their own browser, but not both = cross- browser incompatibility Netscape and Microsoft browser vendors, 1990s One company gets competitive advantage over the other Hypertext: is a way to organize information so that you can click links and view Web content in a non-sequential manner (view topics/pages on Web in any order of preference) Markup: refers to the symbols in HTML code that indicate how the text or images should appear in a browser (inserting codes in text file interpreted by browser) Extensible Hypertext Markup Language (XHTML): specifies that the code to display content on Web pages must follow certain rules Variation of HTML how HTML should be written/structured current version = 1.1 IT IS: uniformly and consistently delivers Web Page content IS NOT: complex text formatting, composing images, manipulating data; line spacing, tab indents TEXT EDITOR (to compose/edit webpage in HTML) such as MICROSOFT NOTEPAD Syntax: specific rules for the way code should be written Mock-up: hand-drawn/typed plan for a page TYPING THE CODE FOR XHTML TAGS, AND TYPING BASIC XHTML TAGS Code for element that has both start and end tags: content Typing code for an empty element: has no content, only has a start tag ( ) Nested Element: appears with another element, nested tags o Nyce Paints MUST type code in lowercase (unlike HTML) Type tags FIRST, then the content XHTML Element: creates structure on a Web Page, conveys formatting instructions to the browser, or conveys information about the Web Page to the browser or search engines EX: content Tag: Representation of an element in XHTML code = emphasizes text; makes text appear in italics = break element; used to create a new line End tags have a forward slash ( / ) before the element name Document Type Declaration: an instruction that associates a particular Web Page with a Document Type Definition Document Type Definition (DTD): instruction to the browser that determines the extent to which the Web Page should follow the XHTML standard; DTD XHTML 1.0 Strict Most common = transitional and strict o Transitional renders all elements o Strict renders only code that EXACTLY conforms to the XHTML syntax (no deprecated code) Deprecated Code: code w3c has determined should no longer be used Quirks Mode: different browsers may render your Web Pages differently (no Document Type Declaration) Standards Mode: has a DTD, ensures page is consistent as possible in all browsers HTML Element: root element, container for all the other elements on a Web Page; points to Web Site anyone can access Head Section: contains XHTML code that does not appear in browsers document window; which is the part of the browser window where Web Pages appear (container for info. about document) Metadata: information about the document itself, such as keywords, author of Web Page, description of content on Web page (meta = empty element) Character Set: one of many standardized ways to represent characters for communication and storage ISO-8859-1 , UFT-8 = larger set of characters, universal Unicode Body Element: container for all of the page content; code, text, images, in document window in browser White Space: blank lines/indenting, any part of the page that does not have content (space, tab, enter keys) Eye Line: vertical area of code where you can easily see start tags File Servers: computers that store files you see on the Web Attribute: defines a change to an element. Each attribute has a value (adjective) that describes the extent to or manner in which the element will be changed. EX: src=nyce logo.gif SRC = source attribute, nyce logo.gif = value of source attribute (name of image file that should appear on webpage) Web Page Accessibility: the extent to which a Web Page is accessible by as many people as possible despite visual or motor skill impairment. Screen Reader: Software that uses a synthesized voice to read aloud the text in the browsers document window. Width/Height Attribute: specify dimensions of an image (usually in pixel values) Aspect Ratio: relationship between width/height of the image To scale = change width/height INCLUDING COMMENTS IN XHTML DOCUMENT Comments: used to explain how the code was written, to indicate an unusual or particular circumstance, or to otherwise include information that helps you or other Web developers better understand the code on a Web Page New blank line in HTML document, type start code for comment: < ! - - Type text for comment Type the end code for a comment: - - > EX: < ! - - image of Nyce Logo is below - - > Can be in the head area of the document Template File: used as the starting point for creating new Web pages FORMATTING TEXT ON A WEB PAGE Heading Elements: used to bring attention to important topics on the page To create the heading code, type the following, where n is a value from 1 through 6 and content is the heading text: content o EX: nyce paints Text size is measured in points ; 72 points = 1 vertical inch XHTML only offers 6 text sizes (h1 = largest, 24 points; h6 = smallest, 8 points) H1 = 24 pts, h2 = 18 pts, etc. (decrease by increments of 2) Paragraph Tags: , ; create blank line between paragraphs (enter key twice) Block-Level Elements: browser automatically created a blank line above and below content (paragraphs, headings, elements) Inline elements; contained within block-level element Block-Quote Element: used to cite a long quotation; is a block-level element ( q element is inline element used to cite short quotations) Formats text to be indented on left and right by approximately one inch Only for long quoted passages! DISPLAYING A WEB PAGE IN A BROWSER After creating XHTML document in text editor (notepad), SAVE the file Start your web browser, and then OPEN the XHTML document Whenever you EDIT the XHTML code in text editor, SAVE the file Switch back to browser, and then REFRESH the page to view revisions CREATING TEXT EMPHASIS strong element: makes text bold o content em element: makes text italic o content Bold and italic text o content IDENTIFYING DEPRECATED TAGS Deprecated Element: one that the W3C has determined should no longer be used Number of other elements have not been deprecated, but they have clearly fallen out of favor with Web page designers because there are better alternatives
More Less

Related notes for COMPSCI 1BA3

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.