HTML Notes
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
HTML
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
HTML Tags and Elements
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Attributes and Hyperlinks
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Headings and Lists
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Class and id attributes
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Semantic Elements
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Inline and Block-Level Elements
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Div and Span
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
img
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Tables
![mobiprep (6).png](https://static.wixstatic.com/media/92c5de_e671b289ab424f72a7959dd0925c902b~mv2.png/v1/fill/w_21,h_18,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/mobiprep%20(6).png)
Forms
Heading
Q
1
What is the function of <div> element in HTML?
![LRM_EXPORT_207556595493866_20190724_1939](https://static.wixstatic.com/media/8d7045_36004a6f5a7c4f918d4748592730e6b4~mv2.jpg/v1/fill/w_639,h_348,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/LRM_EXPORT_207556595493866_20190724_1939.jpg)
Ans
This is the very important block level tag which plays a big role in grouping various other HTML tags and applying CSS on group of elements. It acts as a container for other elements.
![LRM_EXPORT_207556595493866_20190724_1939](https://static.wixstatic.com/media/8d7045_36004a6f5a7c4f918d4748592730e6b4~mv2.jpg/v1/fill/w_639,h_348,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/LRM_EXPORT_207556595493866_20190724_1939.jpg)
Q
2
What are the attributes that can be used with div element?
![LRM_EXPORT_207556595493866_20190724_1939](https://static.wixstatic.com/media/8d7045_36004a6f5a7c4f918d4748592730e6b4~mv2.jpg/v1/fill/w_639,h_348,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/LRM_EXPORT_207556595493866_20190724_1939.jpg)
Ans
Although <div> element doesn’t require attributes but there are three common attributes that can be used-
1. Style
2. Class
3. Id
Example-
<!DOCTYPE html>
<html>
<head> <title>HTML div Tag</title> </head>
<body>
<div style = "color: green">
<h1>This is first group</h1>
<p>Following is a list of sports </p>
<ul>
<li>Cricket</li>
<li>Football</li>
<li>Tennis</li>
<li>Boxing</li>
</ul>
</div>
</body>
</html>
Output: This is first group Following is list of sports-
● Cricket
● Football
● Tennis
● Boxing
![LRM_EXPORT_207556595493866_20190724_1939](https://static.wixstatic.com/media/8d7045_36004a6f5a7c4f918d4748592730e6b4~mv2.jpg/v1/fill/w_639,h_348,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/LRM_EXPORT_207556595493866_20190724_1939.jpg)
Q
3
Explain <span> element in HTML.
![LRM_EXPORT_207556595493866_20190724_1939](https://static.wixstatic.com/media/8d7045_36004a6f5a7c4f918d4748592730e6b4~mv2.jpg/v1/fill/w_639,h_348,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/LRM_EXPORT_207556595493866_20190724_1939.jpg)
Ans
The span element is used as a container for text. Like <div>, it does not require attributes. Style, class and id are the commonly used attributes.
The <span> element is used to style a certain text within a larger text element.
Example-
<!DOCTYPE html>
<html>
<head>
<title>HTML span Tag</title>
</head>
<body>
<p>This is my <span style = "color:red">first assignment</span>.I am <span style = "color:purple">learning </span></p> a lot from it.
</body>
</html>
Output: This is my first assignment. I am learning a lot from it.
![LRM_EXPORT_207556595493866_20190724_1939](https://static.wixstatic.com/media/8d7045_36004a6f5a7c4f918d4748592730e6b4~mv2.jpg/v1/fill/w_639,h_348,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/LRM_EXPORT_207556595493866_20190724_1939.jpg)