
Simple HTML Document Example:
Hello World!
Nice to meet you
- !Doctype html declaration defines that an HTML5 document
- html root element of an HTML page
- head contains meta info regarding the hypertext markup language page
- title specifies a title for the HTML page (which is shown within the browser's title bar or within the page's tab)
- body defines the document's body, and maybe an instrumentality for all the visible contents, like headings, paragraphs, images, hyperlinks, tables, lists, video, etc.
- h1 defines a large heading
- p defines a paragraph
HTML Element:
- Start tag
- Content
- End tag
<tagname> Content </tagname>
HTML element is everything from the start tag to the end tag.
Examples:
<h1>My
First Heading</h1>
<p>My
First Paragraph</p>
HTML Attributes:
Attributes in all HTML elements. They provide additional information about elements. Attributes are always write in starting tag, like that name = “value”
Example:
It’s the example of anchor tag ( < a > ) this tag use for a hyperlink, href attribute specifies the URL of the page where the link will go.
Width and Height Attributes:

The img tag should also contain the width
and height
attributes, which specifies the width and height of the image (in pixels).
They’re some examples of element attributes you’ll observe more when you’ll more learn and experience.
Note:
Don’t forget to finish the tags.
HTML tags don’t seem to be case sensitive, however, the great follow is that always write HTML tag name in lowercase.
1 thought on “Introduction to HTML”
good