Frontend 3
Frontend 3
Frontend 3
===================
Phrase tags are special purpose tags because they defined structure meaning to
block of text or code.
1) Abbreviation - <abr>
3) keyboard - <kbd>
5) address - <address>
6) code - <code>
and etc.
1) Abbreviation - <abr>
--------------------------
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<abr title="Hypertext Markup Language">HTML</abr>
is a widely used language on web
</body>
</html>
3) keyboard - <kbd>
------------------------
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
To copy the text press CTRL+C
<br>
To copy the text press <kbd>CTRL+C</kbd>
</body>
</html>
4) strike - <strike>
----------------------------
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<strike>This is Java class</strike>
</body>
</html>
5) address - <address>
------------------------------
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<address>
1-4.613/9, Nilgiri Block ,Ameerpet, Hyderabad-500036.
</address>
</body>
</html>
6) code - <code>
---------------------------
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<code>
void main()
{
clrscr();
printf("Hello World");
getch();
}
</code>
</body>
</html>
HTML images
============
A <img> tag is used to display the images in HTML.
Image tag is a opening tag with attributes and does not have any closing tag.
ex:
Format Abbreviation
------ ------------
JPEG Joint Photographic Expert Group.
and etc.
ex:
---
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<img src="images/rock.jpg" />
</body>
</html>
ex:
---
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<img src="images/rock.jpg" width="300px" height="300px"/>
</body>
</html>
ex:
---
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<img src="images/rocky.jpg"
alt="No Image Found"
width="300px" height="300px"/>
</body>
</html>
ex:
----
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<img
src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/The_Rock_2023.jpg/
250px-The_Rock_2023.jpg"
alt="No Image Found"
width="300px" height="300px"/>
</body>
</html>
ex:
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<a href="http://www.facebook.com/login">Facebook</a>
</body>
</html>
A target attribute describe a resource must open in a current window or new window.
ex:
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<a href="http://www.facebook.com/login"
target="_self">
Facebook
</a>
</body>
</html>
ex:
---
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<a href="http://www.facebook.com/login"
target="_blank">
Facebook
</a>
</body>
</html>
ex:
---
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<center>
<a href="https://en.wikipedia.org/wiki/Dwayne_Johnson"
target="_blank">
</a>
</center>
</body>
</html>
Interview Questions
===================
HTML entity is a group of characters starts with '&' symbol and ends with
semicolon(;).
HTML entities are used to display the reserved characters and Hidden characters in
HTML.
ex:
Entity Symbol
------- -------
> >
< <
« <<
» >>
non block space
©
and etc.
ex:
---
<!DOCTYPE html>
<html>
<head>
<title>MyPage!</title>
</head>
<body>
<h1> > </h1>
<h1> < </h1>
<h1> « </h1>
<h1> » </h1>
<h1> </h1>
<h1> © </h1>
</body>
</html>
Tag
====
Tag starts with '<' symbol and ends with '>' symbol.
ex:
<h1>, <p>, <i>, <b> and etc.
Element
========
Element defines opening tag , some content and closing tag.
ex:
<h1>This is heading tag </h1>
<p>This is paragraph tag</p>
<i>This is italic tag </i>