HTML
HTML
HTML is a
Page layout specification language
Hyperlink specification language
HTML is not a
Word processing tool
Desktop publishing solution
Programming language
TAG – A coded HTML command or keyword that indicates how a part of the
webpage should be displayed; it is written within angle brackets
BASIC TAGS
<head> - This tag defines the header of the document and contains
information about the title, script, style, document descriptions, etc.
<title> - This tag is used inside the <head> tag and specifies the title
which will appear on the browser’s title bar, and the bookmarks bar of
the user; it identifies the content of the webpage in a global context
<body> - This tag encloses all the other tags, attributes, and information
to be displayed in the webpage and defines the document’s body
<!DOCTYPE html> - Tells the browser what version of HTML is being used
Name: Use the general name of the color, but you cannot get specific
shades or variations of the color
RGB Values: Color model based on red, green, blue values; the value
should be from 0-255, and a 4th value can specify the transparency
ELEMENTS
Container Element – Require paired tags, that are starting tags and
closing tags. Closing tags have a forward slash before the keyword
Empty/ Void Element – Elements which require only a starting tag and
not a closing tag as they are self-contained
TAGS
Paragraphs – <p>
Defines a paragraph in a webpage
Recognizes characters like spaces, tabs, returns, etc.
Attributes: class, id, style, contenteditable, text, align
Line Break – <br>
Used to end a line and insert a blank line before beginning another tag
It can be used as a paragraph marker
It is an empty tag (no need to close)
Each virtual size is 20% larger than its preceding font size
Base font – Empty tag which can be used to set relative font size for elements
<basefont size = 2>
<basefont size = +2>
<basefont size = -2>
TEXT STYLES
Logical – Specify the meaning of the text style and show accordingly
o They are rendered in different manner by different browsers
o Examples: <dfn>, <em>, <code>, <kbd>, <samp>, <strong>
LISTS
<ul type=”disc/circle/square”>
<li> hi </li>
<li> hello </li>
<li> hiello </li>
</ul>
Definition List
<dl compact>
<dt> hi </dt>
<dd> I say hi </dd>
<dt> hello </dt>
<dd> I say hello </dd>
<dt> hieollo </dt>
<dd> I say hiello </dd>
</dl>
<section> </section>
<article> </article>
<nav> </nav>
<aside> </aside>
<header> </header>
HTML IMAGES, LINKS AND
TABLES
IMAGE TAG
LINK
To link to an email:
<a href=”mailto:[email protected]?subject=CSS is better”> mail </a>
TABLE
Embed tag –
AUDIO
VIDEO
Mp4 – video/mp4
WebM – video/webm
Ogg – video/ogg
FORMS
Fieldset and legend are container tags used to give the form a neat look
CSS
CSS – Cascading Style Sheets
Layers in a webpage –
Structure layer: HTML
Presentation layer: CSS
Behavior layer: Scripting language
Inline CSS
Highest priority
Internal CSS
Second priority
Written in <style> in <head>
Least priority, linked to the main HTML code in <head> with <link>
SELECTORS
Background
Font
Border
Outline
ABBREVIATIONS
HTML – Hyper Text Markup Language
HTTP – Hyper Text Transfer Protocol
FTP – File Transfer Protocol
UTF – Unicode Transformation Format
JPG – Joint Photographic Group
JPEG – Joint Photographic Experts Group
PNG – Portable Network Graphics
GIF – Graphics Interchange Format
XBM – X BitMap