HTML Lecture Notes PDF

Summary

These lecture notes cover the basics of HTML, including tags, elements, attributes, and formatting. The notes are written by Dr. Mona Abbas and provide a comprehensive overview of the language.

Full Transcript

Dr. Mona Abbas Content O HTML. 2 Definition of HTML O HTML stands for Hyper Text Markup Language. O HTML is the authoring language used to create documents on the web. O It is used to define the structure and layout of a web page, how a page looks, and any special functions...

Dr. Mona Abbas Content O HTML. 2 Definition of HTML O HTML stands for Hyper Text Markup Language. O HTML is the authoring language used to create documents on the web. O It is used to define the structure and layout of a web page, how a page looks, and any special functions 3 O HTML consists of a series of elements O HTML elements tell the browser how to display the content O HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc 4 O HTML does this by using what are called tags (< />). O Each tag's name is called an element O An HTML element is defined by a start tag, some content, and an end tag: O syntax: content O example: This is a paragraph 5 O As the viewer of a web page, you don't see HTML; it is hidden from your view. You see only the results. O File extension must be (.htm or.html) to be interpreted by The browser. 6 7 O It is the fifth and last major HTML version that is a World Wide Web Consortium (W3C) recommendation. O Index.html often represents the home page of websites O html is not case sensitive language. 8 Go HTML file O The declaration represents the document type, and helps browsers to display web pages correctly. O It must only appear once, at the top of the page (before any HTML tags). 9 Go HTML file O Basic structure: tags that enclose content. O Html, head, and body tags are essential for any html document O Head: gives browser information about this page O Title: specifies the title of this page on the browser (my first web page) O Header describes the page O Body contains the page’s contents 10 11 12 Heading tag 13 Paragraph tag 14 Let’s do this example 15 : The Line Break element O It produces a line break in text. It is useful for writing a poem or an address, where the division of lines is significant. O This element has no content. It is called empty element. O Empty elements also do not have an end tag! O It can be written OR 16 Comment Tags 17 d 18 HTML Attributes O All HTML elements can have attributes O Attributes provide additional information about elements O Attributes are always specified in the start tag and come in name/value pairs like: name="value“ O syntax: O content 19 Link tag 20 Link tag 21 More about anchors Types of URLs that can appear in anchors: O Absolute: to another web site O Relative: to another page on this web site HTML 26 Formatting Elements O Used to format the page: O : used to make the text in bold style. O : used to make the text in italic style. Harry Potter and the Deathly Hallows Book HTML Harry Potter and the Deathly Hallows Book output 27 Formatting Elements O Used to format the page: O : used to make the text in underlined style. O : used to mark the text. Harry Potter and the Deathly Hallows Book HTML Harry Potter and the Deathly Hallows Book output 28 Formatting Elements O Used to format the page: O : used to make the text in subscripted style. O : used to make the text in superscripted style. Harry Potter and the Deathly Hallows Book HTML Harry Potter and the Deathly Hallows Book output 29 Multi-valued attributes 30 Text Formatting Tags Tag Produces bold bold text italic italic text underline underlined text example example 31 32

Use Quizgecko on...
Browser
Browser