HTML Tags
HTML Tags అంటే ఏమిటి?
HTML Tags అనేవి browser కు webpage లోని content రకాన్ని తెలియజేసే ప్రత్యేక keywords. ఇవి సాధారణంగా angle brackets మధ్యలో రాయబడతాయి. ఉదాహరణకు, heading కోసం <h1> tag మరియు paragraph కోసం <p> tag ఉపయోగిస్తారు.
ఒక HTML tag సాధారణంగా <tagname> రూపంలో ఉంటుంది. Tag name ద్వారా ఆ content ను browser ఎలా అర్థం చేసుకోవాలో సూచించబడుతుంది.
సాధారణ HTML Tags
- <h1> — పెద్ద heading కోసం ఉపయోగిస్తారు.
- <p> — paragraph కోసం ఉపయోగిస్తారు.
- <title> — browser tab title కోసం ఉపయోగిస్తారు.
- <body> — browser లో కనిపించే page content కోసం ఉపయోగిస్తారు.
HTML tags case-insensitive అయినప్పటికీ, tags ను చిన్న అక్షరాలతో రాయడం ఒక మంచి coding practice. Tags సరిగ్గా రాస్తే browser మన content ను సరైన విధంగా చూపిస్తుంది.
Simple Explanation
HTML tag అనేది browser కు ఒక సూచన లాంటిది. ఉదాహరణకు, <h1> tag కనిపిస్తే browser ఆ content ను పెద్ద heading గా చూపిస్తుంది. <p> tag కనిపిస్తే ఆ content ను paragraph గా చూపిస్తుంది.
అంటే, HTML tags ఉపయోగించి మన webpage లో heading, paragraph మరియు ఇతర content రకాలను గుర్తించవచ్చు.
Real-Life Example
ఒక పుస్తకంలో chapter heading, paragraphs మరియు page title ఉంటాయి. అలాగే webpage లో heading ను సూచించడానికి <h1>, paragraph ను సూచించడానికి <p>, page title ను సూచించడానికి <title> ఉపయోగిస్తాము. HTML tags webpage content కు సరైన structure ఇస్తాయి.
Code Examples
Heading మరియు Paragraph Tags
<h1>Welcome to HTML</h1>
<p>HTML creates the structure of a webpage.</p>
ఈ ఉదాహరణలో <h1> tag ద్వారా ఒక పెద్ద heading మరియు <p> tag ద్వారా ఒక paragraph రూపొందించబడింది.
The browser displays Welcome to HTML as a large heading and the second sentence as a paragraph.
వివిధ HTML Tags
<title>My Webpage</title>
<h1>About Me</h1>
<p>I am learning web development.</p>
<title> tag browser tab లో page title ను చూపిస్తుంది. <h1> tag main heading కోసం, <p> tag paragraph కోసం ఉపయోగించబడింది.
The browser tab shows My Webpage, while the page displays About Me as a large heading and a paragraph below it.
Line-by-Line Explanation
ఈ declaration browser కు ఇది HTML document అని తెలియజేస్తుంది.
ఈ line మొత్తం HTML document ప్రారంభాన్ని సూచిస్తుంది. lang attribute page భాషను సూచిస్తుంది.
<head> section లో page గురించి browser కు అవసరమైన సమాచారం ఉంటుంది.
<title> tag browser tab లో కనిపించే page title ను నిర్వచిస్తుంది.
ఈ line <head> section ముగిసిందని సూచిస్తుంది.
<body> section లో browser page పై కనిపించే content ఉంటుంది.
<h1> tag ద్వారా page లో పెద్ద heading చూపించబడుతుంది.
<p> tag ద్వారా ఒక paragraph చూపించబడుతుంది.
ఈ line <body> section ముగిసిందని సూచిస్తుంది.
ఈ line మొత్తం HTML document ముగిసిందని సూచిస్తుంది.
Try It
Try this HTML code:
<!DOCTYPE html>
<html lang="te">
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to HTML</h1>
<p>Learn HTML Tags</p>
</body>
</html>
Practice
Practice: మీకు ఇష్టమైన topic పేరును <h1> tag లో రాయండి. ఆ topic గురించి ఒక sentence ను <p> tag లో రాయండి.
Hint: Heading కోసం <h1> tag మరియు sentence కోసం <p> tag ఉపయోగించండి.
Common Mistakes
Tag ను ఎల్లప్పుడూ angle brackets తో రాయాలి. సరైన రూపం <h1>.
పెద్ద heading కోసం <h1> మరియు సాధారణ paragraph కోసం <p> ఉపయోగించాలి.
సరైన HTML tag names మాత్రమే ఉపయోగించాలి. ఉదాహరణకు heading కోసం <h1> మరియు paragraph కోసం <p>.
Interview Questions
HTML tag అంటే ఏమిటి?
Answer: HTML tag అనేది browser కు webpage content రకాన్ని మరియు దాని structure ను తెలియజేసే ప్రత్యేక keyword. ఉదాహరణకు <h1> heading కోసం ఉపయోగించబడుతుంది.
<h1> మరియు <p> tags ను ఎందుకు ఉపయోగిస్తారు?
Answer: <h1> tag ప్రధాన heading కోసం, <p> tag paragraph content కోసం ఉపయోగిస్తారు.
<title> tag యొక్క ఉపయోగం ఏమిటి?
Answer: <title> tag browser tab లో కనిపించే webpage title ను నిర్వచిస్తుంది.
Exam Questions
HTML tag ను సరైన syntax తో ఎలా రాస్తారు?
Answer:
HTML tag ను <tagname> రూపంలో angle brackets మధ్య రాస్తారు. ఉదాహరణకు paragraph కోసం <p>.
Webpage లో పెద్ద heading చూపించడానికి ఏ tag ఉపయోగిస్తారు?
Answer:
పెద్ద heading కోసం <h1> tag ఉపయోగిస్తారు.
Browser tab title ను నిర్వచించే tag ఏది?
Answer:
Browser tab title కోసం <title> tag ఉపయోగిస్తారు.
Quick Revision
- HTML tags browser కు webpage content రకాన్ని తెలియజేస్తాయి.
- <h1> tag పెద్ద heading కోసం ఉపయోగిస్తారు.
- <p> tag paragraph కోసం ఉపయోగిస్తారు.
- <title> tag browser tab title ను నిర్వచిస్తుంది.
- HTML tags ను angle brackets మధ్య రాయాలి.
- Tags ను చిన్న అక్షరాలతో రాయడం మంచి coding practice.
