0% found this document useful (0 votes)
2 views

HTML CSS Detailed Answers

The document provides a comprehensive overview of HTML and CSS, including definitions, basic structures, and examples of elements such as lists, the box model, borders, colors, selectors, and text styles. It also explains CSS attributes like src and href, text shadow, and font specifications. The content is divided into two parts, with Part A focusing on HTML and Part B on CSS.

Uploaded by

acharvinay35
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

HTML CSS Detailed Answers

The document provides a comprehensive overview of HTML and CSS, including definitions, basic structures, and examples of elements such as lists, the box model, borders, colors, selectors, and text styles. It also explains CSS attributes like src and href, text shadow, and font specifications. The content is divided into two parts, with Part A focusing on HTML and Part B on CSS.

Uploaded by

acharvinay35
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML and CSS Question Answers

PART-A

1) What is HTML? Give the basic structure of an HTML page.

HTML (HyperText Markup Language) is used to create web pages.

Basic Structure:

<!DOCTYPE html>

<html>

<head>

<title>My Page</title>

</head>

<body>

<h1>Welcome</h1>

</body>

</html>

2) Explain HTML elements for ordered and unordered lists.

Ordered List:

<ol>

<li>Step 1</li>

<li>Step 2</li>

</ol>

Unordered List:
<ul>

<li>Item A</li>

<li>Item B</li>

</ul>

3) Explain the CSS Box Model.

The CSS Box Model includes content, padding, border, and margin.

Example CSS:

.box {

border: 5px solid red;

4) Different ways to specify borders in CSS.

- Solid: border: 2px solid blue;

- Dotted: border: 2px dotted green;

5) Ways to specify color in CSS.

- Named Colors: color: red;

- RGB: color: rgb(255, 0, 0);

- Hex: color: #ff0000;

6) Explain simple CSS Selectors.

- Class: .classname {color: blue;}

- ID: #idname {font-size: 20px;}

7) Create an HTML document with a table using inline CSS.


<table style="border: 2px solid black;">

<tr><td>Row 1</td></tr>

</table>

8) CSS for text styles.

- Right align: text-align: right;

- Bold: font-weight: bold;

- Italics: font-style: italic;

PART-B

1) What is CSS?

CSS (Cascading Style Sheets) is used to style HTML elements.

Example CSS:

p { color: blue; }

2) Explain src and href attributes.

- src: Used in <img> and <script> for sources.

- href: Used in <a> for links.

3) Text shadow in CSS.

p { text-shadow: 2px 2px 5px gray; }

4) Specifying fonts in CSS.

p { font-family: Arial, sans-serif; font-size: 18px; }

You might also like