w3resource

Components of a HTML page

An HTML page may contain Doctype, Comments, Elements or Tags, Attributes, Frames which may contain other HTML pages.

DOCTYPE

A Doctype declares the version of an HTML document.

html doctype

HTML Elements and Tags

A HTML Element may contain content (text, image, video etc), attributes and other elements in an HTML document.In the picture bellow, if you pick " <a href="/html/html-tutorials.php">Start Learning HTML</a>" for reference, then "<a href="/html/html-tutorials.php">" and "</a>" are HTML a tags. But " <a href="/html/html-tutorials.php">Start Learning HTML</a>" is an HTML element. So we can say that HTML Elements are composed of tags.

html elements

HTML Attributes

An HTML Attribute sets either style or layout or content related information for an HTML Element.

html attributes

HTML Comments

An HTML Comment excludes a part of the code from being displayed in the browser.

html comments

HTML Frames

An HTML Frame contains other HTML pages. In this way, users can view several HTML pages in the same browser window.

html frame

Previous: HTML Editors
Next: HTML block level and inline elements

Test your Programming skills with w3resource's quiz.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/html/components-of-an-HTML-page.php