HTML Tutorial Attributes and Elements

0
541
HTML tutorial Styles
HTML tutorial Styles

HTML tutorial Attributes and Elements –

There are many attributes in HTML through which the display and visualization can be achieved. This is all about HTML tutorial Attributes and Elements

 

Lang

<!DOCTYPE html>
<html lang=”en-UK”>
<body>
<p>
This is an example.
<p>
</body>
</html>
The lang attribute represents that the language is English (United Kingdom). For English in USA, we can mention as lang=”en-US”. This shows the accessibility applications the language of the HTML document.
Title – This attribute helps to show the title of the document clearly. It also helps to show the title of the document at the tab space present at the tab. Even if you hover your mouse over the paragraph where the title is mentioned, the tile can be seen. It is used for accessibility options.
For example<p title=” godofsofts”> This is a webpage. </p>
a href – a href tag is used to represent links. We can represent the links to a specific image or text.
For example<a href=”http://www.godofsofts.com”> GODOFSOFTS</a>
Size attributes, Id, Src and Alt attributes can specify different functions.
Size (width and height) – can define the size of an image
<img src=”http://www.godofsofts.com/wp-content/uploads/2017/03/How-to-remove-a-directory-in-L-inux-534×462.jpg” width=”104″ height=”142″>
Id – to select a specific part or to recall a specific part.
src – to select the source or destination of the image or multimedia file.
<img src=”http://www.godofsofts.com/wp-content/uploads/2017/03/How-to-remove-a-directory-in-L-inux-534×462.jpg” width=”104″ height=”142″>
alt – to select an alternate name for multimedia to that if it is not available, we can use the alternate text.
<img src=”http://www.godofsofts.com/wp-content/uploads/2017/03/How-to-remove-a-directory-in-L-inux-534×462.jpg” width=”104″ height=”142″ alt=”godofsofts HTML”>
hr – to indicate a horizontal row or line in between two or more paragraphs.
<h1>This is first heading</h1>
<p>This is text.</p>
<hr>
<!– THIS IS A HORIZONTAL LINE. YOU CAN EVEN USE WIDTH TO SPECIFY THE AMOUNT OF LENGTH –>
<h2>This is heading 2</h2>
<p>This is some other text.</p>
head – It contains of all the metadata about the HTML document. This will not be displayed.
paragraphs <p> this is a paragraph </p> shows that this is a paragraph and it will be visible to the viewer seeing the HTML document.
<p> this is 
a
paragraph
</p>
Even this will be visible as the first one mentioned because HTML does not consider all the spaces or gaps.
Line break – If you want to give a line break, enter or shift+enter does not give you a line break in HTML. You need to use <br> for line break.
Pre – If you want the paragraph to be as it is written, you need to use <pre> tag.
Example –
<pre> 
My name is Dante
I am the son of Sparda
I will be the king of Hell and Heaven
Whatever may be the birth and death
<pre>
These will be visible as they were exactly written.
For more related to HTML visit HTML Tutorial

LEAVE A REPLY