HTML documents are text files and this is defined by HTML elements.
|Start tag||Element content||End tag|
|<p>||This is a paragraph||</p>|
|<a href=”index.html”>||This is a link||</a>|
|<br>||Inserts a single line break.|
- HTML tags are used to mark-up HTML elements.
- HTML tags are surrounded by the two characters < and >
- The surrounding characters are called angle brackets.
- HTML tags normally come in pairs like <b> and </b>
- The start tag is often called the opening tag. The end tag is often called the closing tag.
- The first tag in a pair is the start tag; the second tag is the end tag.
- The text between the start and end tags is the element content.
- HTML tags are not case sensitive; <b> means the same as <B>
HTML Document Example
<!DOCTYPE html> <html> <body> <p>This is my first <strong>paragraph text</strong>.</p> </body> </html>
- The DOCTYPE defines the HTML document type
- The text between <html> and </html> describes the web page
- The content between <body> and </body> tag is the visible page area
- The <p> element defines a paragraph in the HTML document
- The element content is: This is my first paragraph text.
- The purpose of the <strong> tag is to define an HTML element that should be displayed as bold.
|« Previous||Next Chapter »|