Skip to main content

Learn HTML for beginner : Tags , Attributes , Elements

Tags


The basic structure of an HTML document includes tags,
which surround content and apply meaning to it.
Change your document so that it looks like this:
<!DOCTYPE html>
<html>
<body>
    This is my first web page
</body>
</html>
Now save the document again, go back to the web browser and reload the page.
The appearance of the page will not have changed at all, but the purpose of HTML is to apply meaning, not presentation, and this example has now defined some fundamental elements of a web page.
The first line on the top, <!DOCTYPE html>, is a document type declaration and it lets the browser know which flavor of HTML you’re using (HTML5, in this case). It’s very important to stick this in - If you don’t, browsers will assume you don’t really know what you’re doing and act in a very peculiar way.
To get back to the point, <html> is the opening tag that kicks things off and tells the browser that everything between that and the </html> closing tag is an HTML document. The stuff between <body> and </body> is the main content of the document that will appear in the browser window.

Closing tags

The </body> and </html> put a close to their respective elements (more on elements in a moment).
Not all tags have closing tags like this (<html></html>) some tags, which do not wrap around content will close themselves. The line-break tag for example, looks like this : <br> - a line break doesn’t hold any content so the tag merrily sits by its lonely self. We will come across these examples later. All you need to remember is that all tags with content between them should be closed, in the format of opening tag → content → closing tag. It isn’t, strictly speaking, always a requirement, but it’s a convention we’re using in these tutorials because it’s good practice that results in cleaner, easier to understand code.
You might come across “self-closing” tags, whereby a br tag, for example, will look like “<br />” instead of simply “<br>”. This is a remnant of XHTML, a form of HTML based on another markup language called XML. HTML5 is much more chilled out than XHTML and will be happy with either format. Some developers prefer one way, some prefer the other. We tossed a coin and decided to stick with the simpler version.
Attributes
Tags can also have attributes, which are extra bits of information. Attributes appear inside the opening tag and their values sit inside quotation marks. They look something like <tag attribute="value">Margarine</tag>. We will come across tags with attributes later.
Once again, quotation marks aren’t always essential but it is a good-practice convention HTML Dog uses for consistency and clarity. We suggest you do the same.
Elements
Tags tend not to do much more than mark the beginning and end of an element. Elements are the bits that make up web pages. You would say, for example, that everything that is in between (and includes) the <body> and </body> tags is the body element. As another example, whereas “<title>” and “</title>” are tags, “<title>Rumple Stiltskin</title>” is a title element.

Popular posts from this blog

Free tips to save yourself from phishing

Free tips to save yourself from phishing Phishing is a type of social building method utilized by programmers to assemble delicate data, for example, usernames, passwords and Visa points of interest by acting like a trustworty individual/association. Since most online clients are ignorant of the methods utilized as a part of completing a phishing assault, they regularly fall exploited people

Free internet browser download :internet explorer

Internet explorer full free downloads Internet explorer 11.0.11 full free download Internet explorer 10.0 full free download Internet explorer 9.0 full free download internet ex plorer lastest version download these are the lastest version of internet explorer...if you want anything else then let me by sending me comment i will try my best to give that...............

tricks to Hack an Email using Hardware Keylogger

tricks to Hack an Email using Hardware Keylogger Equipment Keyloggers are utilized for keystroke logging, a system for catching and recording machine client keystrokes. They connect to between a machine console and a machine and log all console action to an inward memory. They are intended to work with PS/2 consoles, and all the more as of late with USB consoles. An equipment keylogger seems just as a USB pendrive (thumb drive) or some other machine fringe so that the victimized people can never