Pages

4/20/2018

HTML Elements


HTML Elements

An HTML element usually consists of a start tag and end tag, with the content inserted in between:
<tagname>Content goes here...</tagname>
The HTML element is everything from the start tag to the end tag:
<p>My first paragraph.</p>
Start tagElement contentEnd tag
<h1>My First Heading</h1>
<p>My first paragraph.</p>
<br>  
HTML elements with no content are called empty elements. Empty elements do not have an end tag, such as the <br> element (which indicates a line break).

Nested HTML Elements

HTML elements can be nested (elements can contain elements).
All HTML documents consist of nested HTML elements.
This example contains four HTML elements:

Example

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

Example Explained

The <html> element defines the whole document.
It has a start tag <html> and an end tag </html>.
The element content is another HTML element (the <body> element).
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
The <body> element defines the document body.
It has a start tag <body> and an end tag </body>.
The element content is two other HTML elements (<h1> and <p>).
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
The <h1> element defines a heading.
It has a start tag <h1> and an end tag </h1>.
The element content is: My First Heading.
<h1>My First Heading</h1>
The <p> element defines a paragraph.
It has a start tag <p> and an end tag </p>.
The element content is: My first paragraph.
<p>My first paragraph.</p>

Do Not Forget the End Tag

Some HTML elements will display correctly, even if you forget the end tag:

Example

<html>
<body>

<p>This is a paragraph
<p>This is a paragraph

</body>
</html>
The example above works in all browsers, because the closing tag is considered optional.
Never rely on this. It might produce unexpected results and/or errors if you forget the end tag.

Empty HTML Elements

HTML elements with no content are called empty elements.
<br> is an empty element without a closing tag (the <br> tag defines a line break).
Empty elements can be "closed" in the opening tag like this: <br />.
HTML5 does not require empty elements to be closed. But if you want stricter validation, or if you need to make your document readable by XML parsers, you must close all HTML elements properly.

Use Lowercase Tags

HTML tags are not case sensitive: <P> means the same as <p>.
The HTML5 standard does not require lowercase tags, but W3C recommendslowercase in HTML, and demands lowercase for stricter document types like XHTML.
At W3Schools we always use lowercase tags.

zealmatblog

2 comments:

  1. ★HIRE A LEGIT HACKER★

    🔍🔍Are you Seeking for the Best Legit Professional Hackers online??❓💻💻💻
    Congratulations Your search ends right here with us. 🔍🔍🔍🔍

    🏅COMPOSITE HACKS is a vibrant squad of dedicated online hackers maintaining the highest standards and unparalleled professionalism in every aspect.
    We Are One Of The Leading Hack Teams in The United States🇺🇸🇺🇸 With So many Accolades From The IT Companies🏆🏅🥇. In this online world there is no Electronic Device we cannot hack. Having years of experience in serving Clients with Professional Hacking services, we have mastered them all. You might get scammed for wrong hacking services or by fake hackers on the Internet. Don't get fooled by scamers that are advertising false professional hacking services via False Testimonies, and sort of Fake Write Ups.❌❌❌❌

    🏅COMPOSITE HACKS is the Answers to your prayers. We Can help you recover the password of your email, Facebook or any other accounts, Facebook Hack, Phone Hack (Which enables you to monitor your kids/wife/husband/boyfriend/girlfriend, by gaining access to everything they are doing on their phone without their notice), You Wanna Hack A Website or Database? You wanna Clear your Criminal Records?? Our Team accepts all types of hacking orders and delivers assured results to alleviate your agonies and anxieties. Our main areas of expertise include but is never confined to:

    ✅Website hacking 💻,
    ✅Facebook and social media hacking📲
    ✅Database hacking, & Blog Cleaning⌨️
    ✅Phone and Gadget Hacking📲
    ✅ CREDIT CARD Loading 💳 💳 ( Strictly USA & UK Credit Cards Only)
    ✅ PayPal Loading & Money Flipping 💰
    ✅Clearing Of Criminal Records❌
    ✅Location Tracking
    ✅ and many More✅

    🏅We have a trained team of seasoned professionals under various skillsets when it comes to online hacking services. Our company in fact houses a separate group of specialists who are productively focussed and established authorities in different platforms. They hail from a proven track record and have cracked even the toughest of barriers to intrude and capture or recapture all relevant data needed by our Clients. 📲💻

    🏅 COMPOSITE HACKS understands your requirements to hire a professional hacker and can perceive what actually threatens you and risk your business⚔️, relationships or even life👌🏽. We are 100% trusted professional hacking Organization and keep your deal entirely confidential💯. We are aware of the hazards involved. Our team under no circumstances disclose information to any third party❌❌. The core values adhered by our firm is based on trust and faith. Our expert hacking online Organization supports you on time and reply to any query related to the unique services we offer
    Time also depends on what exactly you want to hack and how serious you are. Enough time with social engineering is required for hacking. So if you want to bind us in a short time, then just DONT contact us because we can't hack within 10-15minutes, *sorry*.
    I have seen FAKE HACKERS claiming they can hack in 10min , but there is no REAL HACKER who can say this (AVOID THEM) 💯

    💰PAYMENT: PLEASE, Think Of how much you’ll be paying for your job and DONT just Contact Us If You are Willing To waste our time by offering Unreasonable Amounts because we will give you your Job Invoice Based on what you want to hack and the hack tools we are going to use.
    We accept various secure payment methods that maintains your anonymity.

    🏅COMPOSITE HACKS is available for customer care 24/7, all day and night. We understand that your request might be urgent, so we have a separate team of allocated hackers who interact with our Clients round the clock⏰. You are with the right people so just get started.💯✅

    📲 CONTACT:
    E-mail: compositehacks@gmail.com
    Hire a Hacker!
    Want faster service? Contact us!
    HackerOne©️LLC 2018.
    All Rights Reserved ®️

    ★We Treat Every Request With Utmost Confidentiality★ 🙌🏽

    ReplyDelete
  2. Soft Tech Geeks is a Chinese discret organisation of computer experts. We stay discrete in order to protect the identity of our clients from FEDs and general public.
    we offer computer science services such as:
    *Programming
    *Software coding
    *Changing Identity
    *Cyber attacks
    *Cloning of devices
    *Hacking(emails,social media accounts,phone and Computer hacks)
    We understand that there have been lots of scam online which we are currently helping in taking them down. But that not our special offer for you, our special offer is that we allow payment after service. That's right, you dont need to pay before we get the Job done.
    These is to assure trust by clients for us.
    A trial will convince you
    Contact us at Softtechgeeks@gmail.com to more info.

    ReplyDelete

DISCLAIMER: Opinions expressed in the comments are those of the comment writers alone and does not in any way reflect the views of Infotechblog.