2. What is HTML ?
HTML is the standard markup language for creating Web pages.
•HTML stands for Hyper Text Markup Language
•HTML describes the structure of Web pages using
markup
•HTML elements are the building blocks of HTML pages
NOTE := Browsers do not display the HTML tags, but use
them to render the content of the page
•HTML elements are represented by tags
3. BASIC STRUCTURE OF HTML
• <html> tag denotes that the
web page is written in HTML
• <head> tag contains
information about the web
page
• <body> tag contains the
content of the web page
• </html> denotes the end of
the web page
4. All HTML documents must start with a document type
declaration: <!DOCTYPE html>.
The HTML document itself begins with <html>
and ends with </html>.
The visible part of the HTML document is
between <body> and </body>.
THINGS TO BE CONSIDERED
6. An HTML element is an
individual component of an
HTML document or web page,
once this has been parsed into
the Document Object Model.
HTML ELEMENTS
1. BLOCK ELEMENTS
2. INLINE ELEMENTS
7. BLOCK INLINE
Block elements are those that
take up the full width
available on a web page.
Inline elements are those
who only take up as much
width as is needed to display
the contents of the element
Common block elements:
•Paragraphs (<p>)
•Headers (<h1> through <h6>)
•Lists and list items (<ol>, <ul>, and <li>)
•Forms (<form>)
Common inline elements
•Spans (<span>)
•Images (<img>)
•Anchors (<a>)
8. HTML Headings
• Headings are defined with the <h1> to <h6> tags.
• <h1> defines the most important heading.
• <h6> defines the least important heading.
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
9. HTML Paragraphs
The HTML <p> element defines a paragraph
<p>
The quick brown fox jumps over the lazy dog
</p>
<p>
HTML Elements are the building blocks of HTML pages. With HTML constructs, images and other
objects such as interactive may be embedded into the rendered page. HTML provides a means to
create structured document by denoting structural semantics for text such as headings, paragraphs,
lists, links, quotes and other items. HTML elements are delineated by tags, written using angle
brackets. Tags such as <img /> and <input /> directly introduce content into the page. Other tags
such as <p> surround and provide information about document text and may include other tags as
sub-elements. Browsers do not display the HTML tags, but use them to interpret the content of the
page.
HTML can embed programs written in a scripting language such as JavaScript, which affects the
behavior and content of web pages. Inclusion of CSS defines the look and layout of content. The
World Wide Web Consortium (W3C), maintainer of both the HTML and the CSS standards, has
encouraged the use of CSS over explicit presentational HTML since 1997
</p>
10. • The HTML <br> element defines a line break.
HTML Line Breaks
• Use <br> if you want a line break (a new line)
without starting a new paragraph:
<p>
This is
<br>
a paragraph
<br>
with line
breaks.</p>
11. • The <hr> tag defines a thematic break in
an HTML page (e.g. a shift of topic).
• The <hr> element is used to separate
content (or define a change) in an HTML
page.
HTML Horizontal Breaks
<h1>HTML</h1>
<p>HTML is a language for describing web pages.....</p>
<hr>
<h1>CSS</h1>
<p>CSS defines how to display HTML elements.....</p>