Welcome to W3Courses
 Like Us on Facebook

Programming

How to Add Comments in the Html Code

Comments can start with <!-- and end with -->. Comments can be inserted anywhere in the html code. Any text entered between the comment blocks will not show on the html page. Comments can be seen by viewing the source code of the html file.

 Sample Comment Code
 <!--  Type comments between these blocks -->


 

Share

Enter Moving Text on Html Page with Marquee Tag

Moving text in html can be added in the Marquee tags. Following is an example of adding a moving text in html.

<marquee>This text will move </marquee>

Share

How to Add Meta Tags in Html (Author, Robot, Description and Keywords)

Meta tags have many properties. The most common ones are author, robots, description, and keywords.  Meta tags should be added in the head section of your html page.

Author
The Author property contains the name of the author of the page.

Share

Html Tutorials and Common Tags - Crash Course in Html Programming

How to make a Html file?
Html file can be made using FrontPage or Dreamweaver. If you do not have any of these softwares, you can use notepad to make a html file. Open Notepad, write Html code in it and click file, then save as. In the filename field enter "anyname.html" in quotes and save.

Share

Adding Lists in Html Code

Lists can be added in html programming by using the following source code

Ordered List
<ol>  <!-- starting -->
         <li> first  </li>
         <li> second  </li>
</ol>  <!-- end list -->

Share

Adding Background Sound or Music in Html Page

Background sound or music can be added in a html programming using the following code

<bgsound src="path/filename.wav">

Looping for a number of times.
Replace n with a number

<bgsound src="path_to_file/filename.wav" loop="n">

Looping infinite times

<bgsound src="path_to_file/filename.wav" loop="infinite">

 

 

Share

Appends Two Lists using Prolog Source Code

The following code appends two lists

CODE
append([],Y,Y).
append([X|T],Y,[X|R]) :- append(X,Y,R).

RESULT
?- append([a],[b,c],R).
R = [a, b, c]
Yes
 

Share

Delete all occurrences of an Element from a List using Prolog Source Code

The following code deletes all occurrences of an element from a list

CODE
deleteall([],A,[]).
deleteall([H|T],A,Result) :- H=A, deleteall(T,A,Result).
deleteall([H|T],A,[H|Result]) :- deleteall(T,A,Result).


RESULT
?- deleteall([a,b,a,c],a,Result).
Result = [b, c]
Yes


 

Share

Delete the Nth Element from the List using Prolog Source Code

The following code deletes the Nth element from the list

delN([],A,X,N,[]).
delN([H|T],A,X,N,Result) :- H=A, N=1, delN(T,A,X,X,Result).
delN([H|T],A,X,N,[H|Result]) :- H=A, N>1, N1 is N-1, delN(T,A,X,N1,Result).
delN([H|T],A,X,N,[H|Result]) :- delN(T,A,X,N,Result).

Share

List Length Function using Prolog Source Code

The following code returns the length of a given list

CODE
length([],0).
length([H|T],R+1) :- length(T,R).


RESULT
?- length([a,b,c],Z).
Z = 3
Yes

 


 

Share