Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

HTML Interview Questions and Answers

Test your skills through the online practice test: HTML Quiz Online Practice Test

Related differences

Related differences

HTML vs XMLHTML vs XHTMLHTML vs DHTML
HTML 5 vs HTML 4

Ques 26. How do I create a link that sends me email?

Use a mailto link, for example

Is it helpful? Add Comment View Comments
 

Ques 27. How can I have two sets of links with different colors?

You can suggest this presentation in a style sheet. First, specify colors for normal links, like this:

a:link {color: blue; background: white}
a:visited {color: purple; background: white}
a:active {color: red; background: white}

Next, identify the links that you want to have different colors. You can use the CLASS attribute in your HTML, like this:

<a class="example1" href="[URL]">[link text]</a>
Then, in your style sheet, use a selector for links with this CLASS attribute, like this:

a.example1:link {color: yellow; background: black}
a.example1:visited {color: white; background: black}
a.example1:active {color: red; background: black}

Alternatively, you can identify an element that contains the links that you want to have different colors, like this:

<div class="example2">...
<a href="[URL]">[link text]</a>...
<a href="[URL]">[link text]</a>...
<a href="[URL]">[link text]</a>...
</div>

Then, in your style sheet, use a selector for links in this containing element, like this:

.example2 a:link {color: yellow; background: black}
.example2 a:visited {color: white; background: black}
.example2 a:active {color: red; background: black}

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2024 WithoutBook