Html
presentation
Hyper Text Markup
Language
WHAT IS HTML ?
➢
HTML tells the browser to show
text, images and links.
➢
With HTML you can create your
own Website.
Document
Structure
<DOCTYPE html>
<html>
<head>
<title>My first page</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph</p>
</body>
</html>
Every page has this structure.
This is what will be returned on your browser
Headings and Paragraphs
<h1>This is a heading</h1>
<p>This is a paragraph</p>
The “<h1>” is a tag that represents the biggest heading, and “<h6>” the
smallest.
The “<p>” tag makes a paragraph.
Text Formatting.
<b>Bold</B> = This is how you bold a text
<i>Italics</i> = This makes the text appear in Italics
<u>Underline</u> = This underlines your text
<p style="color:blue;">I am blue</p> = This changes font colour
Line Breaks and Rules.
This is what will be returned on your
browser or webpage:
The <br> tag inserts a single line
break
It is also useful for writing poems or
addresses
<br> tag is an empty tag = it has no
end tag (</br>) Example
Insert single line breaks in a text:
<hr> is a horizontal line
E.G = <p>To force<br> line
breaks<br> in a text,<br> use the
br<br> element.</p>
Inserting Links
This is an example of how to insert your link
and how it will appear on the webpage
<a> tag makes clickable links,
This is how you insert a link =
<a href="url">link text</a>
E.G,
<a href="https://www.w3schools
.com/">Visit
W3Schools.com!</a>
Inserting images
The <img> tag is used to embed or insert an image in a web page.
The <img> tag is empty, it contains attributes only, and does not have a
closing tag ( </img> ).
It has 2 attributes : src and alt
Src: tells the browser where to find the image
Alt : It gives alternate text if the image cannot be shown
E.G = <img src="url" alt="alternatetext">
LIST
The <ul> tag = bullet list
<ol> = numbered list
Each item starts with the “<li>” tag
Example :
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Tables
A tables in HTML consist of table
cells inside rows and columns.
Each cell is defined by a <td> and
</td> tag
Everything or text
between <td> and </td> is the
content of a table cell.
Sometimes you may use <th> tag
instead, especially when you want
your cells to be table header cells.
Each row starts with a <tr> tag and
ends with a closing </tr> tag
tr stands for table row.
Div and Span
The <div> tag is a block
element is like a big box
that stretches across the
whole page (from the left
side to the right side).
It automatically starts on a
new line and ends on a new
line
This is like drawing a
rectangle across the whole
page, whatever you erite
inside stays inside that
rectangle, when you are
done writing, you then
begin below the rectangle
and bot beside it.
Div and span contd.
A <span> element which is used to
colour a part of a text:
A <span> example is where only part
of a sentence is styled, while <div>
stretches across the whole page
Common mistakes
One may forget to close tags where a <p> tag is without a </p> tag
Wrong nesting, such as not arranging the tags in the correct order or putting
tags inside each other incorrectly.
Mispelling of attributes, Example : Writing scr instead of src for images
The end
Html is the building block of web pages
reflection
I struggled with understanding html tags such as the listing tags : (<ul>, <ol>,
<li>) were especially confusing.
After learning and researching I understand the structure of an html page
(<!DOCTYPE html>, <html>, <head>, <body>).
I understand the headings, paragraphs, links and images most.
I also learned about blocks and inline elements : the div and span, which was
new to me
REMAINING AREAS: I still need more practice with tables and listing