HTML Guide
HTML Guide
It is the standard markup language for creating web pages (markup languages are used to
structure, format and present content)
HTML ELEMENTS
HTML Elements are defined by a start tag, some contents, and an end tag
HTML elements entail everything from the start tag to the end tag.
Some elements have no content and no end tag. These elements are called Empty elements
Web browsers are used to read HTML documents and also determining how to display the
document.
To learn HTML, you will need a text editor. i.e Notepad, Notepad++, Sublime text
Make sure to save your file with a ‘.html’ extension to make it accessible via your browser.
HTML BASICS
HTML documents must start with a document type declaration: <!DOCTYPE html> [This
helps browsers to display web pages correctly]
As shown on the screenshot above, the <body></body> is the visible part of a HTML
document when viewed on a browser.
Headings [<h1></h1>]
Paragraphs [<p></p>]
Images <img>
Image tags have two required attributes: src (source) & alt (alternate text for the image, if
image fails to load)
Width and Height attributes can also be added to guide the browser on how to display the
images.
HTML ELEMENTS
HTML elements include everything from the start tag <tag> to the end tag </tag>
<h1>Heading </h1>
<p> Paragraph</p>
<br> [break]
<hr> [line]
Nested Elements
HTML elements can be nested, implying that elements can contain other elements.