Career Planning HTML tutorial-4 - WEBMULTICHANNEL

Header Ads

Career Planning HTML tutorial-4

HTML Tutorial

HTML Attribute:

  1. HTML attributes are special words which provide additional information about the elements or attributes are the modifier of the HTML element.
  2. Each element or tag can have attributes, which defines the behaviour of that element.
  3. Attributes should always be applied with start tag.
  4. The Attribute should always be applied with its name and value pair.
  5. The Attributes name and values are case sensitive, and it is recommended by W3C that it should be written in Lowercase only.
  6. You can add multiple attributes in one HTML element, but need to give space between two attributes.

Syntax:

 <element attribute_name="value">content</element>

With link address:

<a href="https://www.webmultichannel.com">This is a link</a> 

Without link address:
<a href="">This is a link</a>  


HTML Elements:

An HTML file is made of elements. These elements are responsible for creating web pages and define content in that webpage. An element in HTML usually consist of a start tag <tag name>, close tag </tag name> and content inserted between them. Technically, an element is a collection of start tag, attributes, end tag, content between them.

<p> Hello world!!! </p>  



Example:


  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4.     <title>WebPage</title>  
  5. </head>  
  6. <body>  
  7.    <h1>This is my first web page</h1>  
  8.     <h2> How it looks?</h2>  
  9.      <p>It looks Nice!!!!!</p>  
  10. </body>  
  11. </html>   



output:




Example:

  1. <!DOCTYPE html>  
  2. <html>  
  3.              <head>  
  4.     </head>  
  5. <body>  
  6.     <div style="background-color: lightblue">This is first div</div>  
  7.     <div style="background-color: lightgreen">This is second div</div>  
  8.     <p style="background-color: pink">This is a block level element</p>  
  9. </body>  
  10. </html>  


output:


Example:

  1. <!DOCTYPE html>  
  2. <html>  
  3.     <head>  
  4.     </head>  
  5. <body>  
  6.     <a href="https://www.javatpoint.com/html-tutorial">Click on link</a>  
  7.     <span style="background-color: lightblue">this is inline element</span>  
  8.     <p>This will take width of text only</p>  
  9.  </body>  
  10. </html>    

output:





  

No comments

Theme images by 5ugarless. Powered by Blogger.