Understanding some special elements in HTML:-
• HTML characters: there are characters in HTML which are reserved. This character can be used for some specific symbol or a function. This can be done with &entity_name; It is not possible to display some elements in browser like <a> because it is identified as a tag so it will be included in code. To display this we use special characters to display it in a browser.
As you know that if you write <> in a code browser will not display it as it will included in HTML code. To display this in a output or in browser we use HTML characters.
Some examples of HTML characters:-
1. spacing:   To add space between two elements.
2. < : &it To Display Less Than.
3. > : > To Display Greater Than.
4. & : & To display and.
5. ©️ : © To display copyright sign.
• <Pre> tag : pre tag is used to display text in same manner as written in HTML code.
(If you write each word in new line as follows without pre tag, it will displayed in browser output as a single line.)
• Html content editable: to create editable contenteditable attribute is used and has value true or false. With this we can edit content in a or a text displayed in a output
• Buttons in HTML: button are click able element can be used to do some function like submit, reset, etc. With this tag we can create buttons.
(From output you can see how HTML characters, content-editable attribute, and button element works in HTML. You may noticed that browser doesn't shown the spacing. and also t h is displayed without linebreak browser render it in single line. Pre tag is used to display content as it is in code )
Comments
Post a Comment