More HTML

More about HTML

Working with HTML Lists

Unordered lists

Create unordered lists using the <ul> tags, then use <li> tags to populate the list with items.

				
					<ul>
    <li> Flour </li>
    <li> Baking Soda </li>	
    <li> Brown Sugar </li>
</ul>

				
			

This lists as bullet point as default

Ordered list

Create ordered lists using the <ol> tags, then use <li> tags to populate the list with items.

This lists as numbers as default. For nested list use

				
					<ol>
    <li> Flour </li>
    <li> Baking Soda </li>
    <li> Brown Sugar </li>
</ol>
				
			

The Em, Strong, B and I Elements

Emphasis <em>

Use the <em> elements for text that has a stressed emphasis relative to the surrounding text. Most browser will render it in italics, but you can change this via CSS.

				
					<p> “Just <em> do </em> it already!” </p>
				
			

“Just do it already!”

Idiomatic Text Element <i>

It’s just like emphasis but simply code is change

				
					<p> “Just <i> do </i> it already!” </p>
				
			

“Just do it already!”

Strong <strong>

It’s just bolded the text. Use strong element for the text that has special significance.

Browser will display it as bold, but you can change this via CSS.

				
					<p> Whatever you do, <strong> do not let the cats out </strong></p>
				
			

Whatever you do, do not let the cats out.

Bold <b>

Use the <b> element to bring attention to text. Use it for text that is traditionally bolded. Only when there is not a more suitable element.

				
					<p> This is an <b> HTML </b> course. </p>
				
			

Nesting Elements

A tag has inside another tag is called nesting elements.

Superscript and Subscript

Superscript

For superscript we use “sup” and subscript we use “sub”

				
					<h1> 4<sup> th </sup> of July </h1>
				
			

4th of July

Use the <sup> tags to designate text as superscript (raised baseline with smaller text)

Subscript

Use the <sub> tags to designate text as subscript (lowered baseline with smaller text)

				
					<p> Give Me Some H <sub> 2</sub> O</p> 
				
			

Give Me Some H2

Creating Links

Links have following points

  • Link text                 “what does the link say?”
  • Destination “where does the link take you do?”
				
					<a href = “https://ahmadwebx.com”?> Go to ahmadwebx </a>
				
			

Use the anchor element to create hyperlinks to other webpages and documents.

Attributes

  • Control an elements behavior
  • Go inside the opening tag
  • Attribute= “Value”
  • href=” google.com”
  • src=” dog.png”

Other Type of Links

Relative links

We can also link directly to other HTML documents by referencing them using a relative path.

				
					<a href= “about.html”> About Us </a>
				
			

It is contact two separate page together.

If you have other page in another folder

				
					<a href= “otherpage/about.html”> About Us </a>
				
			

One Page Links

				
					<a href= “#about.html”> About Us </a>
<h2 id= “about.html”> About Us </h2>
				
			

Creating Images

Images

  • Create image elements using the <img> tag. Note that it does not have a closing tag.

The src attribute specifies the location of the image to be displayed

You can paste direct link in code.

				
					<img class="lazy lazy-hidden" src="//ahmadwebx.com/wp-content/plugins/a3-lazy-load/assets/images/lazy_placeholder.gif" data-lazy-type="image" data-src= “dog.png” alt = “cute puppy”><noscript><img src= “dog.png” alt = “cute puppy”></noscript>
				
			
Facebook
Twitter
LinkedIn
Pinterest
WhatsApp

Table of Contents

Ghulam Ahmad is an Excellent Writer, His magical words added value in growth of our life. Highly Recommended

Read more about poetries

Ahmad Shafi Poetry

Leave a Reply

Your email address will not be published. Required fields are marked *