Small Queries and Answers to know about CSS, JS and HTML | Know About

Do you know how to use HTML, CSS and JS ?

If you are a beginner in Front End Development you must have read the post at least once. Have you ever wondered how to solve small coding problems ? Have you ever wanted to rapidly increase your coding skills ? When I am writing blog posts about coding, I am learning a lot. If you want to learn a lot or If you want to be a developer you have to work hard and make time for practice everyday.

Here, we are going to see 16 small questions and answers about HTML, CSS and JS.


1. Create HTML program to display the text colour using inline style sheet ?

<b style="color:blue;">INLINE STYLE SHEET</b>

EXAMPLE: INLINE STYLE SHEET


2. How to align text in center in CSS ?

body{ display: flex; justify-content: center; }

EXAMPLE: ALIGN TEXT CENTER USING CSS


3. How to use Internal css in html ?

<style type="text/css"> body{ align-items: center; } </style>


4. How to use class in css ?

.content{ box-sizing: border-box; }


5. How to add External css in html?

<link rel="stylesheet" href="border.css">


6. How to use indent text in html?

<b style="text-indent: 5px;">Text Indent</b>

EXAMPLE:

Text Indent with 20px


7. How to add comment in html?

<!-- <b style="text-indent: 5px;">Text Indent</b> -->


8. How to make a button in html?

<input type="button" id="b1" value="submit" onclick="butn1">

EXAMPLE:


9. How to make an image a background in html?

body{ background-image:url("IMAGE URL"); }


10. How to add background color in html?

body{ background-color:blue; }


11. How to insert link in html?

<a href="ENTER LINK HERE"></a>

EXAMPLE: Draw a scale using Java


12. How do I add image in html?

<img alt="IMAGE NAME" src="IMAGE LINK OR SOURCE"/>


13. How to insert Java Script into HTML?

<head> <script type="text/javascript"> javascript coding </script> </head>


14. How to center text in HTML?

<center> This tag centers text horizontally </center>

EXAMPLE:

ALIGN TEXT CENTER USING HTML


15. How to add single line or multi line comment in css?

/*p { align-items: center; font-family: sans-serif font-size: medium; }*/ This is the only standard form to add comments in css


16. How to display HTML code on Web page ?

<textarea> <b> Display HTML code on Web page </b> </textarea> (or) Now I am using XMP tag to display codes.

EXAMPLE:


0 Comments