Recap On HTML Elements ??? - Ashutosh

Hot

Post Top Ad

Sunday, September 10, 2017

Recap On HTML Elements ???

Hello, Everyone Myself Ashutosh and today  you learn The recap on HTML Elements ???









Each HTML Element has an Element name ( Body, h1 , p , br )

• The start tag is the name surrounded by angle bracket  <h1>

The end tag is a slash and the neame surrounded by angle brackets <h1>.

 • The element content occurs between the start tag and the end tag .

• Some HTML element have no content.

• Some HTML element have no end tag.


Basic Notes - useful Tips

when you write HTML text, you can never be sure how the text is dispalyed in another browser. Some people have large computer displays, some have small . The text will be reformatted every time the user resizes his window. Never try to format the text in your editor by adding empty lines and spaces tot the text.  HTML will truncate the spaces in your text . Any number of spaces count as one. Some extra information : In HTML a new line counts as one space. Using empty paragraphs <p> to insert blank lines is a bad habit. use the <br> tag instead. (But don't use the <br> tag to create lists. Wait until you have learned about HTML lists .). HTML automatically adds an extra blank line before and after some elements, like before and after a paragraph, and before and after a headibg .We use a horizontal rule (the <hr> tag ) , to separate the sections.

HTML Attributes

Attributes provide additional information to an HTML element.


HTML Tag Attributes

HTML Tags can have attributes. Attributes provide additional information to an HTML element .Attributes always come in name/value pair like this : name="value". Attributes are always specified in the start tag of an HTML element.


Attributes Example 1:

<h1> defines the start if a heading.
<h1 align="center"> has additional information about the alignment

Attirubtes Example 2:

<body> defines  the body of an HTML document.
<body bgcolor="yellow"> has an additional information about the background color.

Attributes Example 3:

<table> defines an HTML table.( you will learn more about HTML tables later.)

<table border="I"> has additional information about the border around the table.

Use Lowercase Attributes 

Attributes and atrribute values are case - insensitive . However ,the world Wide Web consortium(W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation and XHTML. demands lowercase attributes/attribute values.

Always Quote Attribute Values 

Attributes values should always be enclosed in quotes. Double style quotes are the most common, but single styles quotes are also allowed . In some rare situations, like when the attribute value itself contains quotes it is necessary to use single quotes:
name='john "shotGun" Nelson'

                   *********😊**********
Written With Hearts 💙

Thanks

Subscribe- www.ashutosh000.blogspot.com

Created by Ashutosh