Problem: You want to embed a PDF file on your html page. And you’re looking for the best way to do that. Solution: The best way of embedding a PDF file is to use the <object> tag. The code: Explanation: Read more
Problem: You want to put a background on the contents (texts or image) and make it transparent using opacity. But you don’t want to change opacity of your contents. HTML: CSS: By doing this, both background and text become in Read more
Problem: There are two inline-block elements in your page. Suppose HTML: And, the CSS: Here, you used “display:inline-block” to control margin and padding on inline elements. But, this “inline-block” creates a problem making whitespaces between inline-block elements. You need to Read more
Problem: You have a “iframe” section in your page that holds another page. Now you need to add some CSS to style the <iframe> tag.
Problem: You create a form for users in your page. When a user starts to fill the form, by default, the browser shows options to fill in the field, based on earlier typed values. You need to disable this displaying option.
The problem: You have an HTML page. It has a “div” block element with few texts which doesn’t fill the height of the browser window. Now you need to make sure that div will take 100% height of browser window.
Problem: You have an HTML page which contains non-void elements (which have contents with end tag). Suppose <div></div>, <p></p>. Now you don’t want to use end tag (</div>) and instead you like to use self-closing tags like this – <div Read more
Problem: You create a form for users in your page. When a user starts to fill the form, by default, browser shows options or some suggestions to fill in the field, based on earlier typed values. You need to disable Read more
Problem: You have to write an HTML page. Here you can use <article> and <section> element. You need to know when and where these elements are used and how these elements are used correctly.