Info 1601 Lecture 1 - HTML
Info 1601 Lecture 1 - HTML
Info 1601 Lecture 1 - HTML
Lecture 1: HTML
Nicholas Mendez
What is HTML
These are optional attributes that can be added to all tags and vary in function below are some
examples.
hidden Hide the element from the document <p hidden="true"> ... </p>
title Adds a tooltip when a pointer hovers over the element <p title="my paragraph"> ... </p>
class Attach an identifier to group multiple elements <p class="header-paras"> ... </p>
Attributes 3: Required Attributes
Some elements have attributes which must be specified and given a value. The following are
some examples
Image - img src: Specified the source location of the image <img src="image.png"></img>
These are optional attributes that allow us to define some behaviour in response to an event
which occurs on an html element. These attributes usually begin with "on"
HTML Elements
Metadata Elements
Meta-data
These are a class of elements which allows us to add information which help describe the web page itself as well as
link other files to it. Meta-data elements must be children of the head element. Meta-data elements are written with
the meta tag and must provide the attributes; name and content. Here is a list of possible meta tags you can add to a
website which would be used by different browsers or services.
Title
The title element sets the title of the website and would be shown in the tab of the website in the browser.
Link
The link tag is used to link external files to the website such as css files, web manifests or preloading javascript files.
Typography
Section Elements
● The internet is a global network of various types of servers that run operate over various
protocols eg: FTP, SMTP, POP, HTTP, SSH, Telnet, DNS
● Uniform Resource Locator (URL) is the fully specified address of a resource on a network.
● Different of internet applications would require different URL formats Eg
○ email smtp://[email protected]
○ web http://google.com
Absolute URLs/Paths
EG. href="https://picsum.photos/200/300.webp"
EG href=”/200/300.webp”
URL Addressing - Relative URLs/Paths
This is when we use relative addressing to specify the location of a resource (destination) relative to the location of
the current webpage being edited (source).
In short "/" is used to delimit directories. "." to reference something in the same directory of the source file and ".." is
used up to the parent directory f the source file.
Note if the source is in the root directory, then its directory relative and root relative
address to any destination is the same
Anchor Elements
● Weblinks are created using the anchor tag <a>
● Links allows developers to direct the user to; a portion of the page, an external website or even another application.
input type="month/week/time">
input type="text" hides the virtual keyboard
inputmode="none"
Multiple <select multiple>
Selection/C
input type="text" affects mobile virtual
ollection <input type=”checkbox”>
inputmode="numeric/tel/deci keyboard
mal/email/url/search"
Buttons <button> <input type=”button”>
Color input type="col