0% found this document useful (0 votes)
3 views

HTML Lecture 89 Slides

This document provides an overview of HTML elements, including their structure, attributes, and formatting options. It explains the use of empty elements, text formatting tags, and quotation elements, along with examples for each. Additionally, it covers the purpose of HTML comments for documentation and debugging purposes.

Uploaded by

hloere3
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

HTML Lecture 89 Slides

This document provides an overview of HTML elements, including their structure, attributes, and formatting options. It explains the use of empty elements, text formatting tags, and quotation elements, along with examples for each. Additionally, it covers the purpose of HTML comments for documentation and debugging purposes.

Uploaded by

hloere3
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

LECTURE 2

HTML ELEMENTS

 An HTML element is defined by a start tag, some content, and an end tag.
 <tagname>Content goes here...</tagname>
Examples:

<h1>My First Heading</h1>


<p>My first paragraph.</p>
EMPTY HTML ELEMENTS

 HTML elements with no content are called empty elements.


 The <br> tag defines a line break, and is an empty element without a closing tag
HTML ATTRIBUTES
HTML ATTRIBUTES

 All HTML elements can have attributes


 Attributes provide additional information about elements
 Attributes are always specified in the start tag
 Attributes usually come in name/value pairs like: name="value“
Examples:
<img src="img_girl.jpg" alt="Girl with a jacket">
<a href="https://www.w3schools.com">Visit W3Schools</a>
HTML TEXT FORMATTING
HTML Text Formatting

Formatting elements were designed to display special types of text:


 <b> - Bold text
 <strong> - Important text
 <i> - Italic text
 <em> - Emphasized text
 <mark> - Marked text
 <del> - Deleted text
 <sub> - Subscript text
 <sup> - Superscript text
HTML TEXT Formatting

 The HTML <b> element defines bold text, without any extra importance.
 The HTML <strong> element defines text with strong importance. The content inside
is typically displayed in bold.
 The HTML <i> element defines a part of text in an alternate voice or mood. The
HTML <em> element defines emphasized text. The content inside is typically
displayed in italic.
 The HTML <mark> element defines text that should be marked or highlighted
 The HTML <del> element defines text that has been deleted from a document.
Browsers will usually strike a line through deleted text
 The HTML <sub> element defines subscript text. Subscript text appears half a
character below the normal line
 The HTML <sup> element defines superscript text. Superscript text appears half a
character above the normal line
HTML QUOTATIONS
HTML QUOTATIONS

We will go through the <blockquote>, <q>, <abbr> and <cite> HTML elements.
 HTML <blockquote> for Quotations
The HTML <blockquote> element defines a section that is quoted from another source
Example:
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For nearly 60 years, WWF has been protecting the future of nature. The world's leading
conservation organization, WWF works in 100 countries and is supported by more than
one million members in the United States and close to five million globally.
</blockquote>
HTML QUOTATIONS

 The HTML <q> tag defines a short quotation.


Browsers normally insert quotation marks around the quotation
Example:
<p>WWF's goal is to: <q>Build a future where people live in
harmony with nature.</q></p>
 The HTML <abbr> tag defines an abbreviation or an acronym, like "HTML", "CSS",
"Mr.", "Dr.", "ASAP", "ATM".
Example:
<p>The <abbr title="World Health Organization">WHO</abbr> was
founded in 1948.</p>
HTML QUOTATIONS

 The HTML <cite> tag defines the title of a creative work (e.g. a book, a poem, a
song, a movie, a painting, a sculpture, etc
<p><cite>The Scream</cite> by Edvard Munch. Painted in 1893.</p>
 The HTML cite element defines the title of a work.
 Browsers usually display cite elements in italic.
COMMENTS
COMMENTS

 HTML comments are not displayed in the browser, but they can help document
your HTML source code.
 With comments you can place notifications and reminders in your HTML code.
 Comments are also great for debugging HTML, because you can comment out
HTML lines of code, one at a time, to search for errors
<!-- Remember to add more information here -->

You might also like