Docsity

Hyper Text Markup Language for Computer Science, Summaries of Computer Science

Partial preview of the text

Download Hyper Text Markup Language for Computer Science and more Summaries Computer Science in PDF only on Docsity!

8/8/2021 HTML Elements. 3 w Menu v schools HTML Elements [ Content goes here... Examples of some HTML elements: My First Heading

My first paragraph.

Start tag Element content End tag My First Heading

My first paragraph.


none none Note: Some HTML elements have no content (like the
element). These elements are called empty elements. Empty elements do not have an end tag! https://www.w3schools.com/html/html_elements.asp 1/9 8/8/2021 HTML Elements. Nested HTML Elements HTML elements can be nested (this means that elements can contain other elements). All HTML documents consist of nested HTML elements. The following example contains four HTML elements ( , ,

and

): Example

My First Heading

My first paragraph.

Example Explained The element is the root element and it defines the whole HTML document. It has a start tag and anend tag . Then, inside the element there is a element: My First Heading

My first paragraph.

https://www.w3schools.com/html/html_elements.asp 2/19 8/8/2021 HTML Elements. Example

This is a paragraph

This is a paragraph However, never rely on this! Unexpected results and errors may occur if you forget the end tag! Empty HTML Elements HTML elements with no content are called empty elements. The
tag defines a line break, and is an empty element without a closing tag: Example

This is a
paragraph with a line break.

HTML is Not Case Sensitive HTML tags are not case sensitive:

means the same as

. https://www.w3schools.com/html/html_elements.asp 419