What is HTML?



Example Explained

The !DOCTYPE html declaration defines this document to be HTML5
The html element is the root element of an HTML page
The head element contains meta information about the document
The title element specifies a title for the document
The body element contains the visible page content
The h1 element defines a large heading
The p element defines a paragraph


Html Tags

HTML tags normally come in pairs like p and /p The first tag in a pair is the start tag, the second tag is the end tag The end tag is written like the start tag, but with a forward slash inserted before the tag name


Browsers

purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them. The browser does not display the HTML tags, but uses them to determine how to display the document.


Tables

Links and Images

This is a quick section to show how links work.

Lists

There are two types of lists that can be used. Ordered and unordered. Bullet points are unordered. Number points are ordered.
Because of this, when you are making something a list, use "ol" for an ordered list and "ul" for unordered. Then use "li" to type what you want.

Links

HTML links are defined with the "a" tag. The link address is specified in the href attribute.

Attributes

Style is what controls how things look on a page. Here is an example:
"tagname style="property:value;""


CSS


There are three ways to insert CSS:


Inline only applies to the single tag it applies to. Internal will apply to the entire page. External will apply to the entire website.



Classes

Create classes in the style section in the head. Classes are used for identification so they can apply certain things to wherever you put your class tag.
The class attribute specifies one or more class names for an HTML element. THe class name can be used by CSS and JavaScript to perofrm certain tasks for elements with the specified class name.

ID

An HTML element can only have one unique id that belongs to that single element. The ID attribute specifies a unique id for an HTML element.