Skip to content

CSP02/HTML-methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Methods

HTML methods

A package that can handle methods in html(for non repetative code).

What is Methods?

Have you ever get frustated of writing the same code in html to get what you want. Then here you are use this package? to make it easy by defining your method using a "def" tag and "name" attribute to name your method.

Usage:

  • Methods package is very simple to use.
  • All you need to do is to define the method using "def" tag and "name" attribute.
  • And then to call the method you can use the value you provided in name attribute.
  • That's it. Note: You can copy any code that means if you want to copy the code which is at the bottom it will work.

Example:

<test></test>
<commit></commit>
<!--use the method name as the tag name-->
<def name="test">
    <p>Help</p>
</def>
<def name="commit">
    <p>commit</p>
</def>

NOTE:

  • Remember that these def tags will be removed once the page is loaded so that you cannot see the code inside this def tags
  • So the code inside these tags only works once you call them using as a tag name
  • Run index.html file and inspect the changes in html so you can know more.

Output:

MethodsOutput

About

A package that can handle methods in html(for non repetative code).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published